List of utility methods to do JPanel Child
void | addComponent(JPanel contentPane, GridBagConstraints gbc, JLabel label, JComponent component) add Component gbc.gridx = 0; contentPane.add(label, gbc); gbc.gridx = 1; contentPane.add(component, gbc); gbc.gridx = 0; |
void | addComponent(JPanel panel, Component c, int x, int y, int width, int height, int ipadx, int ipady, double weightx, double weighty, int fill, int anchor) Methode zum Einfuegen einer Komponente in ein Panel mit GridBagLayout. int dx = 0; int dy = 0; if (c instanceof JSeparator) { dy = VER_SEP_DIST; } else { dx = HOR_FIELD_DIST; dy = VER_FIELD_DIST; addComponent(panel, c, x, y, width, height, ipadx, ipady, dx, dy, weightx, weighty, fill, anchor); |
void | addComponents(JPanel panel, JComponent... comps) add Components for (JComponent comp : comps) {
panel.add(comp);
|
Component | addGBC(JPanel panel, Component component, int gridx, int gridy, int anchor, Insets insets) add GBC GridBagConstraints gbc = new GridBagConstraints(); gbc.anchor = anchor; gbc.insets = insets; gbc.gridx = gridx; gbc.gridy = gridy; panel.add(component, gbc); return component; |
void | addInput2Pane(String label, Component c, JPanel p, int row) add the component with the label at left to the JPanel at row JLabel jlabel = new JLabel(label); int a = GridBagConstraints.EAST, f = GridBagConstraints.HORIZONTAL; addComponent(p, jlabel, 0, row, 1, 1, f, a, 0, 0); addComponent(p, c, 1, row, 1, 1, f, a, 1, 1); |
void | addSection(JPanel panel, String title) add Section addSection(panel, title, "center");
|
void | addSpacer(JPanel panel) add Spacer JPanel filler = new JPanel(); filler.setOpaque(false); filler.setPreferredSize(new Dimension(0, 10)); panel.add(filler, "span"); |
void | addTo(JPanel panel, String label, String value) add To JLabel lhs = strongFont(new JLabel(label)); JLabel rhs = mildFont(new JLabel(value)); addTo(panel, lhs, rhs); |
void | addToGridBag(Component comp, JPanel panel, int gridx, int gridy, int width, int height, int anchor) Adds a component to a panel with a grid bag layout addToGridBag(comp, panel, gridx, gridy, width, height, anchor, DEFAULT_PADDING); |
void | addToGridBag(final JPanel panel, final Component component, final int x, final int y) add To Grid Bag addToGridBag(panel, component, x, y, 1, 1, -1, -1); |