use of java.awt.Panel in project voltdb by VoltDB.
the class Transfer method createBorderPanel.
/**
* Method declaration
*
*
* @param center
*/
private Panel createBorderPanel(Component center) {
Panel p = new Panel();
p.setBackground(SystemColor.control);
p.setLayout(new BorderLayout());
p.add("Center", center);
p.add("South", createLabel(""));
p.add("East", createLabel(""));
p.add("West", createLabel(""));
p.setBackground(SystemColor.control);
return p;
}
use of java.awt.Panel in project GDSC-SMLM by aherbert.
the class MultiDialog method buildPanels.
protected Panel buildPanels() {
Panel p = new Panel();
BorderLayout layout = new BorderLayout();
layout.setVgap(3);
p.setLayout(layout);
p.add(buildResultsList(), BorderLayout.NORTH, 0);
p.add(buildButtonPanel(), BorderLayout.CENTER, 1);
return p;
}
use of java.awt.Panel in project voltdb by VoltDB.
the class ZaurusTableForm method initGUI.
private void initGUI() {
Panel pEntry = new Panel();
pEntry.setLayout(new GridBagLayout());
GridBagConstraints c = new GridBagConstraints();
c.fill = GridBagConstraints.HORIZONTAL;
c.insets = new Insets(3, 3, 3, 3);
c.gridwidth = 1;
c.gridheight = 1;
c.weightx = c.weighty = 1;
c.anchor = GridBagConstraints.WEST;
komponente = new ZaurusComponent[columns.length];
for (int i = 0; i < columns.length; i++) {
c.gridy = i;
c.gridx = 0;
pEntry.add(new Label((String) columns[i]), c);
c.gridx = 1;
int constraint = this.getConstraintIndex(i);
if (constraint >= 0 && imColIndex[constraint].length == 1) {
// we use ony foreign keys with one index
ZaurusChoice tmp = new ZaurusChoice();
this.fillZChoice(tmp, refTables[constraint], refColumns[constraint][0]);
tmp.addItemListener(this);
komponente[i] = tmp;
pEntry.add(tmp, c);
} else if (columnTypes[i] == java.sql.Types.DATE) {
// System.out.println("hier gibt es eine Date-Spalte namens "+columns[i]);
ZaurusTextField tmp = new ZaurusTextField(8);
tmp.addTextListener(this);
pEntry.add(tmp, c);
komponente[i] = tmp;
} else {
ZaurusTextField tmp = new ZaurusTextField(5);
tmp.addTextListener(this);
pEntry.add(tmp, c);
komponente[i] = tmp;
}
komponente[i].setEditable(true);
}
this.add(pEntry);
}
use of java.awt.Panel in project voltdb by VoltDB.
the class ZaurusEditor method initButtons.
// init the three boxes for buttons
private void initButtons() {
// the buttons for the search form
bSearchRow = new Button("Search Rows");
bNewRow = new Button("Insert New Row");
bSearchRow.addActionListener(this);
bNewRow.addActionListener(this);
pSearchButs = new Panel();
pSearchButs.setLayout(new GridLayout(1, 0, 4, 4));
pSearchButs.add(bSearchRow);
pSearchButs.add(bNewRow);
// the buttons for editing a row
bCancel1 = new Button("Cancel");
bPrev = new Button("Prev");
bNext = new Button("Next");
bDelete = new Button("Delete");
lastButtonDelete = false;
bNewSearch = new Button("Search");
bCancel1.addActionListener(this);
bPrev.addActionListener(this);
bNext.addActionListener(this);
bDelete.addActionListener(this);
bNewSearch.addActionListener(this);
pEditButs = new Panel();
pEditButs.setLayout(new GridLayout(1, 0, 4, 4));
pEditButs.add(bCancel1);
pEditButs.add(bPrev);
pEditButs.add(bNext);
pEditButs.add(bDelete);
pEditButs.add(bNewSearch);
// the buttons for inserting a new row
pInsertButs = new Panel();
pInsertButs.setLayout(new GridLayout(1, 0, 4, 4));
bCancel2 = new Button("Cancel Insert");
bNewInsert = new Button("New Insert");
bNewSearch1 = new Button("Search");
bCancel2.addActionListener(this);
bNewInsert.addActionListener(this);
bNewSearch1.addActionListener(this);
pInsertButs.add(bCancel2);
pInsertButs.add(bNewInsert);
pInsertButs.add(bNewSearch1);
}
use of java.awt.Panel in project jdk8u_jdk by JetBrains.
the class CardTest method create.
Panel create(LayoutManager layout) {
Button b = null;
Panel p = new Panel();
p.setLayout(layout);
b = new Button("one");
b.addActionListener(listener);
p.add("North", b);
b = new Button("two");
b.addActionListener(listener);
p.add("West", b);
b = new Button("three");
b.addActionListener(listener);
p.add("South", b);
b = new Button("four");
b.addActionListener(listener);
p.add("East", b);
b = new Button("five");
b.addActionListener(listener);
p.add("Center", b);
b = new Button("six");
b.addActionListener(listener);
p.add("Center", b);
return p;
}
Aggregations