javax.swing.BoxLayout Usage, Examples, Demos and Tutorials

.Code Examples of javax.swing.A layout manager that allows multiple components to be laid out either vertically or horizontally. The components will not wrap so, for example, a vertical arrangement of components will stay vertically arranged when the frame is resized. Nesting multiple panels with different combinations of horizo…

e1.printStackTrace();

}

guanotes_ = app;

setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));

ScrollPane listPane = new ScrollPane();

listPane.add(guanoteList_);

listPane.setMinimumSize(new Dimension(1,1));

add(listPane);

Panel buttonPanel = new Panel();

buttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.X_AXIS));

buttonPanel.add(newGuanote_);

buttonPanel.add(deleteGuanote_);

add(buttonPanel);

e1.printStackTrace();

}

guanotes_ = app;

setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));

ScrollPane listPane = new ScrollPane();

listPane.add(guanoteList_);

listPane.setMinimumSize(new Dimension(1,1));

add(listPane);

Panel buttonPanel = new Panel();

buttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.X_AXIS));

buttonPanel.add(newGuanote_);

buttonPanel.add(deleteGuanote_);

add(buttonPanel);

e1.printStackTrace();

}

guanotes_ = app;

setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));

ScrollPane listPane = new ScrollPane();

listPane.add(guanoteList_);

listPane.setMinimumSize(new Dimension(1,1));

add(listPane);

Panel buttonPanel = new Panel();

buttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.X_AXIS));

buttonPanel.add(newGuanote_);

buttonPanel.add(deleteGuanote_);

add(buttonPanel);

e1.printStackTrace();

}

guanotes_ = app;

setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));

ScrollPane listPane = new ScrollPane();

listPane.add(guanoteList_);

listPane.setMinimumSize(new Dimension(1,1));

add(listPane);

Panel buttonPanel = new Panel();

buttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.X_AXIS));

buttonPanel.add(newGuanote_);

buttonPanel.add(deleteGuanote_);

add(buttonPanel);

e1.printStackTrace();

}

guanotes_ = app;

setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));

ScrollPane listPane = new ScrollPane();

listPane.add(guanoteList_);

add(listPane);

Panel buttonPanel = new Panel();

buttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.X_AXIS));

buttonPanel.add(newGuanote_);

buttonPanel.add(deleteGuanote_);

add(buttonPanel);

e1.printStackTrace();

}

guanotes_ = app;

setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));

ScrollPane listPane = new ScrollPane();

listPane.add(guanoteList_);

listPane.setMinimumSize(new Dimension(1,1));

add(listPane);

Panel buttonPanel = new Panel();

buttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.X_AXIS));

buttonPanel.add(newGuanote_);

buttonPanel.add(deleteGuanote_);

add(buttonPanel);

public GuanoteList(GuanotesApp app) {

super(“Guanotes”);

guanotes_ = app;

setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));

ScrollPane listPane = new ScrollPane();

listPane.add(guanoteList_);

add(listPane);

Panel buttonPanel = new Panel();

buttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.X_AXIS));

buttonPanel.add(newGuanote_);

buttonPanel.add(deleteGuanote_);

add(buttonPanel);

e1.printStackTrace();

}

guanotes_ = app;

setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));

ScrollPane listPane = new ScrollPane();

listPane.add(guanoteList_);

listPane.setMinimumSize(new Dimension(1,1));

add(listPane);

Panel buttonPanel = new Panel();

buttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.X_AXIS));

buttonPanel.add(newGuanote_);

buttonPanel.add(deleteGuanote_);

add(buttonPanel);

e1.printStackTrace();

}

guanotes_ = app;

setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));

ScrollPane listPane = new ScrollPane();

listPane.add(guanoteList_);

listPane.setMinimumSize(new Dimension(1,1));

add(listPane);

Panel buttonPanel = new Panel();

buttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.X_AXIS));

buttonPanel.add(newGuanote_);

buttonPanel.add(deleteGuanote_);

add(buttonPanel);

e1.printStackTrace();

}

guanotes_ = app;

setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));

ScrollPane listPane = new ScrollPane();

listPane.add(guanoteList_);

add(listPane);

Panel buttonPanel = new Panel();

buttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.X_AXIS));

buttonPanel.add(newGuanote_);

buttonPanel.add(deleteGuanote_);

add(buttonPanel);

public GuanoteList(GuanotesApp app) {

super(“Guanotes”);

guanotes_ = app;

setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));

ScrollPane listPane = new ScrollPane();

listPane.add(guanoteList_);

add(listPane);

Panel buttonPanel = new Panel();

buttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.X_AXIS));

buttonPanel.add(newGuanote_);

buttonPanel.add(deleteGuanote_);

add(buttonPanel);

e1.printStackTrace();

}

guanotes_ = app;

setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));

ScrollPane listPane = new ScrollPane();

listPane.add(guanoteList_);

add(listPane);

Panel buttonPanel = new Panel();

buttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.X_AXIS));

buttonPanel.add(newGuanote_);

buttonPanel.add(deleteGuanote_);

add(buttonPanel);

public GuanoteList(GuanotesApp app) {

super(“Guanotes”);

guanotes_ = app;

setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));

ScrollPane listPane = new ScrollPane();

listPane.add(guanoteList_);

add(listPane);

Panel buttonPanel = new Panel();

buttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.X_AXIS));

buttonPanel.add(newGuanote_);

buttonPanel.add(deleteGuanote_);

add(buttonPanel);

e1.printStackTrace();

}

guanotes_ = app;

setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));

ScrollPane listPane = new ScrollPane();

listPane.add(guanoteList_);

add(listPane);

Panel buttonPanel = new Panel();

buttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.X_AXIS));

buttonPanel.add(newGuanote_);

buttonPanel.add(deleteGuanote_);

add(buttonPanel);

e1.printStackTrace();

}

guanotes_ = app;

setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));

ScrollPane listPane = new ScrollPane();

listPane.add(guanoteList_);

listPane.setMinimumSize(new Dimension(1,1));

add(listPane);

Panel buttonPanel = new Panel();

buttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.X_AXIS));

buttonPanel.add(newGuanote_);

buttonPanel.add(deleteGuanote_);

add(buttonPanel);

e1.printStackTrace();

}

guanotes_ = app;

setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));

ScrollPane listPane = new ScrollPane();

listPane.add(guanoteList_);

listPane.setMinimumSize(new Dimension(1,1));

add(listPane);

Panel buttonPanel = new Panel();

buttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.X_AXIS));

buttonPanel.add(newGuanote_);

buttonPanel.add(deleteGuanote_);

add(buttonPanel);

e1.printStackTrace();

}

guanotes_ = app;

setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));

ScrollPane listPane = new ScrollPane();

listPane.add(guanoteList_);

listPane.setMinimumSize(new Dimension(1,1));

add(listPane);

Panel buttonPanel = new Panel();

buttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.X_AXIS));

buttonPanel.add(newGuanote_);

buttonPanel.add(deleteGuanote_);

add(buttonPanel);

e1.printStackTrace();

}

guanotes_ = app;

setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));

ScrollPane listPane = new ScrollPane();

listPane.add(guanoteList_);

add(listPane);

Panel buttonPanel = new Panel();

buttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.X_AXIS));

buttonPanel.add(newGuanote_);

buttonPanel.add(deleteGuanote_);

add(buttonPanel);

public GuanoteList(GuanotesApp app) {

super(“Guanotes”);

guanotes_ = app;

setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));

ScrollPane listPane = new ScrollPane();

listPane.add(guanoteList_);

add(listPane);

Panel buttonPanel = new Panel();

buttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.X_AXIS));

buttonPanel.add(newGuanote_);

buttonPanel.add(deleteGuanote_);

add(buttonPanel);

e1.printStackTrace();

}

guanotes_ = app;

setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));

ScrollPane listPane = new ScrollPane();

listPane.add(guanoteList_);

add(listPane);

Panel buttonPanel = new Panel();

buttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.X_AXIS));

buttonPanel.add(newGuanote_);

buttonPanel.add(deleteGuanote_);

add(buttonPanel);

e1.printStackTrace();

}

guanotes_ = app;

setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));

ScrollPane listPane = new ScrollPane();

listPane.add(guanoteList_);

listPane.setMinimumSize(new Dimension(1,1));

add(listPane);

Panel buttonPanel = new Panel();

buttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.X_AXIS));

buttonPanel.add(newGuanote_);

buttonPanel.add(deleteGuanote_);

add(buttonPanel);

JPanel statusPanel = new JPanel();

statusPanel.add(new JLabel(“Status:”)); statusPanel.add(status_);

JPanel top = new JPanel();

top.setLayout(new BoxLayout(top, BoxLayout.Y_AXIS));

top.add(inputPanel);

top.add(statusPanel);

getContentPane().add(top, BorderLayout.NORTH);

JPanel bottom = new JPanel();

bottom.setLayout(new BoxLayout(bottom, BoxLayout.Y_AXIS));

textBuffer_ = new JTextArea(5,20); textBuffer_.setName(“Messages”);

JScrollPane scrollPane = new JScrollPane(textBuffer_);

scrollPane.setSize(textBuffer_.getWidth(), textBuffer_.getHeight());

bottom.add(scrollPane);

JPanel statusPanel = new JPanel();

statusPanel.add(new JLabel(“Status:”)); statusPanel.add(status_);

JPanel top = new JPanel();

top.setLayout(new BoxLayout(top, BoxLayout.Y_AXIS));

top.add(inputPanel);

top.add(statusPanel);

getContentPane().add(top, BorderLayout.NORTH);

JPanel bottom = new JPanel();

bottom.setLayout(new BoxLayout(bottom, BoxLayout.Y_AXIS));

textBuffer_ = new JTextArea(5,20); textBuffer_.setName(“Messages”);

JScrollPane scrollPane = new JScrollPane(textBuffer_);

scrollPane.setSize(textBuffer_.getWidth(), textBuffer_.getHeight());

bottom.add(scrollPane);

JPanel statusPanel = new JPanel();

statusPanel.add(new JLabel(“Status:”)); statusPanel.add(status_);

JPanel top = new JPanel();

top.setLayout(new BoxLayout(top, BoxLayout.Y_AXIS));

top.add(inputPanel);

top.add(statusPanel);

getContentPane().add(top, BorderLayout.NORTH);

JPanel bottom = new JPanel();

bottom.setLayout(new BoxLayout(bottom, BoxLayout.Y_AXIS));

textBuffer_ = new JTextArea(5,20); textBuffer_.setName(“Messages”);

JScrollPane scrollPane = new JScrollPane(textBuffer_);

scrollPane.setSize(textBuffer_.getWidth(), textBuffer_.getHeight());

bottom.add(scrollPane);

JPanel statusPanel = new JPanel();

statusPanel.add(new JLabel(“Status:”)); statusPanel.add(status_);

JPanel top = new JPanel();

top.setLayout(new BoxLayout(top, BoxLayout.Y_AXIS));

top.add(inputPanel);

top.add(statusPanel);

getContentPane().add(top, BorderLayout.NORTH);

JPanel bottom = new JPanel();

bottom.setLayout(new BoxLayout(bottom, BoxLayout.Y_AXIS));

textBuffer_ = new JTextArea(5,20); textBuffer_.setName(“Messages”);

JScrollPane scrollPane = new JScrollPane(textBuffer_);

scrollPane.setSize(textBuffer_.getWidth(), textBuffer_.getHeight());

bottom.add(scrollPane);

JPanel statusPanel = new JPanel();

statusPanel.add(new JLabel(“Status:”)); statusPanel.add(status_);

JPanel top = new JPanel();

top.setLayout(new BoxLayout(top, BoxLayout.Y_AXIS));

top.add(inputPanel);

top.add(statusPanel);

getContentPane().add(top, BorderLayout.NORTH);

JPanel bottom = new JPanel();

bottom.setLayout(new BoxLayout(bottom, BoxLayout.Y_AXIS));

textBuffer_ = new JTextArea(5,20); textBuffer_.setName(“Messages”);

JScrollPane scrollPane = new JScrollPane(textBuffer_);

scrollPane.setSize(textBuffer_.getWidth(), textBuffer_.getHeight());

bottom.add(scrollPane);

Related Class of javax.swing.BoxLayout

Copyright © 2011 www.androidadb.com. All rights reserved. All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc. Contact . See also:

|

|

|

Read More Post