public void testTabbedPane() throws Exception {
   JTabbedPane tabbedPane =
       (JTabbedPane) getInstrumentedRootComponent("TestTabbedPane.form", "BindingTest");
   assertEquals(2, tabbedPane.getTabCount());
   assertEquals("First", tabbedPane.getTitleAt(0));
   assertEquals("Test Value", tabbedPane.getTitleAt(1));
   assertTrue(tabbedPane.getComponentAt(0) instanceof JLabel);
   assertTrue(tabbedPane.getComponentAt(1) instanceof JButton);
 }
Ejemplo n.º 2
0
 public void addHTMLTab(String tabTitle, String info, StringBuffer code) {
   // maybe switch on title to determine an image
   HTMLTextView html = new HTMLTextView(code, contextMenu);
   tabbedPane.addTab(tabTitle, icon, html, info);
   tabbedPane.setSelectedIndex(tabbedPane.getTabCount() - 1);
 }