The import javax.mail. Swing. Text. JTextComponent;
Import the Java. The awt. *;
The class FlowLayoutPosition extends JFrame
{
Public FlowLayoutPosition ()
{
The Container c=getContentPane ();
SetLayout (new FlowLayout (FlowLayout. CENTER, 100, 40));
???????????????????????????????????????????????????????????? Add sentences where
SetSize (300300);
SetDefaultCloseOperation (WindowConstants DISPOSE_ON_CLOSE);
SetVisible (true);
}
Public static void main (String [] args)
{
New FlowLayoutPosition ();
}
}
CodePudding user response:
The import javax.mail. Swing. *;Import the Java. The awt. *;
The class FlowLayoutPosition extends JFrame
{
Public FlowLayoutPosition ()
{
The Container c=getContentPane ();
SetLayout (new FlowLayout (FlowLayout CENTER, 100, 10));
C.a. dd (new JLabel (" this is a dialog box "));
C.a. dd (new JButton (" A: cool autumn weather, vegetation oscillation dew to cream "));
C.a. dd (new JButton (" B: Snow White have what seems, salt air general plan "));
C.a. dd (new JButton (" c: endless blue day lotus plants, video on lotus another red "));
C.a. dd (new JButton (" D: bamboo peach three two branches, everything duck prophet "));
SetSize (300300);
SetDefaultCloseOperation (WindowConstants DISPOSE_ON_CLOSE);
SetVisible (true);
}
Public static void main (String [] args)
{
New FlowLayoutPosition ();
}
}
C.a. dd (new JLabel (" this is a dialog box ")); This sentence how to let him center or aligned to the right
CodePudding user response:
The