Re: How to use FlowLayout in Java?
The code snippet below creates a FlowLayout object and the components it manages.
Code:
FlowLayout TrialLayout = new FlowLayout();
...
compsToTrial.setLayout(TrialLayout);
compsToTrial.add(new JButton("Button 1"));
compsToTrial.add(new JButton("Button 2"));
compsToTrial.add(new JButton("Button 3"));
compsToTrial.add(new JButton("Long-Named Button 4"));
compsToTrial.add(new JButton("5"));
IF you hate me, please don't mention it. I know who hates me and who doesn't. You really do not have to make fun of people....
Bookmarks