JTabbedPane中如何获取当前标签名称用Swing表示
来源:百度知道 编辑:UC知道 时间:2024/06/02 01:44:46
String temp = jtabbedpane.getTitleAt(jtabbedpane.getSelectedIndex());
getSelectedIndex()方法表示获得当前选择的选项卡的索引值(int类型,从0开始,-1表示未选中任何选项卡)。
getTitleAt(index)方法表示获得索引值为index的选项卡的标题。
UC知道是一部内容开放、自由的互动网络百科全书
客观、专业、权威的知识性百科全书
来源:百度知道 编辑:UC知道 时间:2024/06/02 01:44:46
String temp = jtabbedpane.getTitleAt(jtabbedpane.getSelectedIndex());
getSelectedIndex()方法表示获得当前选择的选项卡的索引值(int类型,从0开始,-1表示未选中任何选项卡)。
getTitleAt(index)方法表示获得索引值为index的选项卡的标题。