JFrame & JLable
Code : - // 1 - JFrame // 2 - JLabel // 3 - FlowLayout - basic JLabel background = new JLabel (); background . setLocation ( 150 , 150 ); background . setBackground ( Color . black ); background . setOpaque ( true ); background . setSize ( 250 , 250 ); JLabel heading = new JLabel ( "Details" ); // YOu can also use setText function for set Text heading . setForeground ( Color . black ); // Change the Text Color heading . setBackground ( Color . white ); heading . setOpaque ( true ); heading . setHorizontalAlignment ( JLabel . CENTER ); //heading.setText(); heading . setSize ( 250 , 40 ); //----------------------Name------------------- JLabel name = new JLabel (); name . setBackground ( Color . white ); name . setOpaque ( true ); name . setForeground ( Color . black ); name . setText ( "Name" ); name . setSize ( 50 , 20 ); name . setLocation ( 20 , 60 ); // Set Margin name . setHorizontalAlignment...