0

我有一个包含 2 个 JPanel 的 tabbedPane。

tabbedPane = new JTabbedPane();

tabbedPane.addTab("Main", null, mainPanel, "Does nothing");
    tabbedPane.setMnemonicAt(0, KeyEvent.VK_1);

tabbedPane.addTab("Report", null, reportPanel, "Still does nothing");

我在第一个面板中,操作后我将传递到第二个面板(主 -> 报告)。

我该怎么做?

4

1 回答 1

3

JTabbedPane#setSelectedIndex(int index)

于 2013-08-10T11:02:41.453 回答