List of utility methods to do JPanel Create
JPanel | newJPanel(Component... c) new J Panel JPanel p = new JPanel(new FlowLayout(FlowLayout.LEFT)); for (int i = 0; i < c.length; i++) p.add(c[i]); return p; |
JPanel | newJPanel(int layoutAxis, Component... components) new J Panel JPanel retval = new JPanel(); retval.setLayout(new BoxLayout(retval, layoutAxis)); for (Component component : components) retval.add(component); return retval; |
void | setJPanelOpaque(JPanel p, boolean opaque) set J Panel Opaque p.setOpaque(opaque); for (int iComp = 0; iComp < p.getComponentCount(); iComp++) { if (p.getComponent(iComp) instanceof JPanel) { setJPanelOpaque((JPanel) p.getComponent(iComp), opaque); |
JPanel | vbox(JPanel panel, List components) Layout the given components vertically. return doLayout(panel, getComponentArray(components), 1, WT_Y, WT_N);
|
JPanel | vgrid(JPanel panel, List components, int space) Do a single column grid layout of the components if (panel == null) { panel = new JPanel(); panel.setLayout(new GridLayout(0, 1, space, space)); for (int i = 0; i < components.size(); i++) { panel.add((Component) components.get(i)); return panel; ... |