Advertisement
Guest User

Untitled

a guest
Nov 3rd, 2012
176
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.88 KB | None
  1. public class JGraphCard extends JPanel {
  2.     private JPaintablePanel firstGraphPanel = new JPaintablePanel();
  3.     private JPaintablePanel secondGraphPanel = new JPaintablePanel();
  4.  
  5.     public JGraphCard() {
  6.         super(new CardLayout(0, 0));
  7.         setBorder(BorderFactory.createLineBorder(Color.black));
  8.  
  9.         add(firstGraphPanel, "firstGraphPanel");
  10.         add(secondGraphPanel, "secondGraphPanel");
  11.     }
  12.  
  13.     public JPaintablePanel getPSO() {
  14.         return psoGraphPanel;
  15.     }
  16.  
  17.     public JPaintablePanel getFireFly() {
  18.         return fireFlyGraphPanel;
  19.     }
  20.  
  21.     public GridBagConstraints getGridBagConstraints() {
  22.         GridBagConstraints gbc = new GridBagConstraints();
  23.         gbc.gridwidth = 2;
  24.         // gbc.gridheight = GridBagConstraints.REMAINDER;
  25.         gbc.weightx = 3.0;
  26.         gbc.weighty = 12.0;
  27.         gbc.insets = new Insets(0, 0, 0, 5);
  28.         gbc.fill = GridBagConstraints.BOTH;
  29.         gbc.gridx = 0;
  30.         gbc.gridy = 1;
  31.         return gbc;
  32.     }
  33.  
  34. }
Advertisement
RAW Paste Data Copied
Advertisement