コード例 #1
0
  // ------------------------------------------------------------------------------------------------------
  protected void createGui() {
    mainFrame = new JFrame(myGaggleName);
    MiscUtil.setApplicationIcon(mainFrame);

    mainFrame.setJMenuBar(createMenuBar());
    mainFrame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
    JPanel outerPanel = new JPanel();
    mainFrame.getContentPane().add(outerPanel);
    outerPanel.setLayout(new BorderLayout());

    JToolBar toolbar = new JToolBar();
    toolbar.setFloatable(false);
    JButton bossButton = new JButton("Boss");
    bossButton.addActionListener(
        new ActionListener() {
          public void actionPerformed(ActionEvent e) {
            try {
              gaggleBoss.show("boss");
            } catch (RemoteException rex) {
              rex.printStackTrace();
            }
          }
        });

    toolbar.add(bossButton);
    outerPanel.add(toolbar, BorderLayout.NORTH);

    tabbedPane = new JTabbedPane();
    tabbedPane.setUI(new MyTabbedPaneUI());

    outerPanel.add(tabbedPane, BorderLayout.CENTER);

    mainFrame.pack();
    mainFrame.setSize(800, 800);
    mainFrame.setVisible(true);
    MiscUtil.placeInCenter(mainFrame);
  } // createGui
コード例 #2
0
 // ------------------------------------------------------------------------------
 public void addNewTab(String clusterIdAs3DigitString) {
   tabbedPane.add(createScrolledPdfViewer(clusterIdAs3DigitString), clusterIdAs3DigitString);
   tabbedPane.setSelectedIndex(tabbedPane.getTabCount() - 1);
 }