Advertisement
Guest User

Untitled

a guest
Feb 10th, 2016
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. // Command List
  2. DefaultListModel<String> listInput = new DefaultListModel<String>();
  3. JList<String> list = new JList<String>(listInput);
  4. list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
  5. JScrollPane scrollPane = new JScrollPane(list);
  6. list.setBackground(new Color(160, 160, 160));
  7. list.setSelectionBackground(new Color(150, 150, 150));
  8. scrollPane.setPreferredSize(new Dimension(20, 20));
  9. manager.setCommandList(listInput);
  10.  
  11. c.insets = new Insets(2, 2, 2, 2);
  12. c.ipady = 0;
  13. c.ipadx = 100;
  14. c.gridx = 0;
  15. c.gridy = 1;
  16. c.gridwidth = 1;
  17. c.gridheight = 2;
  18. c.weightx = 0.1;
  19. c.weighty = 0.6;
  20. c.fill = GridBagConstraints.BOTH;
  21. console.add(scrollPane, c);
  22.  
  23. // Image Displayer
  24. JLabel image = new JLabel(new ImageIcon());
  25. manager.setImageField(image);
  26.  
  27. c.insets = new Insets(0, 0, 0, 0);
  28. c.ipady = 0;
  29. c.ipadx = 0;
  30. c.gridx = 0;
  31. c.gridy = 0;
  32. c.gridwidth = 1;
  33. c.gridheight = 1;
  34. c.weightx = 0.1;
  35. c.weighty = 0.3;
  36. c.fill = GridBagConstraints.BOTH;
  37. console.add(image, c);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement