Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- titlePanel = new JPanel();
- titlePanel.setBackground(new Color(192, 192, 192));
- titlePanel.setLayout(new BoxLayout(titlePanel, BoxLayout.X_AXIS));
- titlePanel.setMaximumSize(new Dimension(8000, 20));
- titlePanel.setMinimumSize(new Dimension(100, 20));
- //Create table data
- String[] columnNames = new String[1];
- columnNames[0] = "";
- String[][] data = new String[1][];
- data[0] = new String[2];
- data[0][0] = " blabla";
- data[0][1] = "";
- //Create gap
- int sum = depth * 20;
- JPanel blankPanel = new JPanel();
- blankPanel.setBackground(new Color(192, 192, 192));
- blankPanel.setMinimumSize(new Dimension(sum, 20));
- blankPanel.setMaximumSize(new Dimension(sum, 20));
- titlePanel.add(blankPanel);
- //Create button
- openCloseButton = new JToggleButton();
- openCloseButton.setMinimumSize(new Dimension(15, 15));
- openCloseButton.setMaximumSize(new Dimension(15, 15));
- openCloseButton.setIcon(EditorTreePropertiesPanel.PLUS_ICON);
- openCloseButton.setSelectedIcon(EditorTreePropertiesPanel.MINUS_ICON);
- openCloseButton.setContentAreaFilled(false);
- openCloseButton.setOpaque(false);
- openCloseButton.setFocusPainted(false);
- titlePanel.add(openCloseButton);
- JTable table = new JTable(data, columnNames)
- {
- @Override
- public boolean isCellEditable(int row, int column)
- {
- return false;
- };
- };
- table.getTableHeader().setVisible(false);
- table.setMinimumSize(new Dimension(200, 16));
- table.setMaximumSize(new Dimension(20000, 16));
- titlePanel.add(table);
Add Comment
Please, Sign In to add comment