Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Command List
- DefaultListModel<String> listInput = new DefaultListModel<String>();
- JList<String> list = new JList<String>(listInput);
- list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
- JScrollPane scrollPane = new JScrollPane(list);
- list.setBackground(new Color(160, 160, 160));
- list.setSelectionBackground(new Color(150, 150, 150));
- scrollPane.setPreferredSize(new Dimension(20, 20));
- manager.setCommandList(listInput);
- c.insets = new Insets(2, 2, 2, 2);
- c.ipady = 0;
- c.ipadx = 100;
- c.gridx = 0;
- c.gridy = 1;
- c.gridwidth = 1;
- c.gridheight = 2;
- c.weightx = 0.1;
- c.weighty = 0.6;
- c.fill = GridBagConstraints.BOTH;
- console.add(scrollPane, c);
- // Image Displayer
- JLabel image = new JLabel(new ImageIcon());
- manager.setImageField(image);
- c.insets = new Insets(0, 0, 0, 0);
- c.ipady = 0;
- c.ipadx = 0;
- c.gridx = 0;
- c.gridy = 0;
- c.gridwidth = 1;
- c.gridheight = 1;
- c.weightx = 0.1;
- c.weighty = 0.3;
- c.fill = GridBagConstraints.BOTH;
- console.add(image, c);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement