Examples of indexOfTabComponent()


Examples of javax.swing.JTabbedPane.indexOfTabComponent()

        if (dragging) {
          frame.getDesktopPane().getDesktopManager().endDraggingFrame(frame);
          dragging = false;
        } else {
          JTabbedPane tabbedPane = getTabbedPane();
          int index = tabbedPane.indexOfTabComponent(TitleLabel.this.getParent());
          tabbedPane.setSelectedIndex(index);
        }
      }
  }
}
View Full Code Here

Examples of javax.swing.JTabbedPane.indexOfTabComponent()

    final JLabel label = new JLabel() {
      // display the title according to what's set on our JTabbedPane
      @Override
      public String getText() {
        final JTabbedPane tabbedPane = ClosableTabComponent.this.tabbedPane;
        final int index = tabbedPane.indexOfTabComponent(ClosableTabComponent.this);
        return index > -1 ? tabbedPane.getTitleAt(index) : "";
      }
    };
    label.setBorder(BorderFactory.createEmptyBorder(3, 0, 2, 7));
    add(label);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.