Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- JComponent c = getDisclosedComponent(newValue);
- GridBagLayout layout = (GridBagLayout) getLayout();
- GridBagConstraints gbc = new GridBagConstraints();
- if (c != null) {
- gbc = new GridBagConstraints();
- gbc.gridx = 1;
- gbc.weightx = 1d;
- gbc.weighty = 1d;
- gbc.fill = GridBagConstraints.BOTH;
- gbc.anchor = GridBagConstraints.WEST;
- add(c, gbc);
- gbc = new GridBagConstraints();
- gbc.gridx = 0;
- gbc.weightx = 0d;
- gbc.insets = new Insets(0, 1, 0, 1);
- gbc.weighty = 1d;
- gbc.fill = GridBagConstraints.NONE;
- gbc.anchor = GridBagConstraints.SOUTHWEST;
- add(disclosureButton, gbc);
- } else {
- gbc = new GridBagConstraints();
- gbc.gridx = 1;
- gbc.weightx = 1d;
- gbc.weighty = 1d;
- gbc.fill = GridBagConstraints.NONE;
- gbc.anchor = GridBagConstraints.SOUTHWEST;
- gbc.insets = new Insets(0, 1, 0, 1);
- add(disclosureButton, gbc);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement