Home > Back-end >  Flow layout manager which bosses know how to add the sentence!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Flow layout manager which bosses know how to add the sentence!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Time:11-08

The import javax.mail. Swing. *;
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
refer to the original poster Lin_bai_ response:
import javax.mail. Swing. *;
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 ();
}
}



Initialize a container at a lower level, directly add not to go,

CodePudding user response:

Now I ADD, font position what get???
  • Related