i am working with a JTabbedPane and am facing a problem. i want to change the title of a tabbedpane. i am using the setTitleAt() method. however there is no change in the top corner where the name of the tab is displayed. however when i am using getTitleAt() method i am getting the changed title. can anyone please help.

Recommended Answers

All 2 Replies

Could you please post some code? I just test the method, and it seems to work fine for me. You could try repainting the tabbed pane, although it shouldn't make a difference.

aveek,

....
         JTabbedPane tp=new JTabbedPane();
         tp.addTab("one",new JPanel()); 
         tp.addTab("two",new JPanel());

         tp.setTitleAt(0,"New Title");  // New title for 1st tab
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.