• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

Closable Tabs

 
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi. I tried to make a tab panel that have a 'X' to close the tabs but what I get is an huge 'X' in the middle of the tabs panels instead of being placed next to the tab titles. Fromm the codes, I have two tabs with two titles. One is 'xxx@jabber.org' and the other one is 'yyy@jabber.org'. When I run the codes, both titles are 'xxx@jabber.org' until when I select the second tab then would it turn to the expected 'yyy@jabber.org'.

The main problem I need help with is the close button for the tab.

You would notice I have a line of code in one of the java 'ChatPanel.java'... around line 50+


What happens is that when I uncomment and attempts to add a textarea to the tab panels, the 'X' would completely disappear.

Why is that so ?

I need help for this closable tabs panel. Below are the 2 source codes.

Thanks for helping.

MainFrame.java


ChatPanel.java



 
Sheriff
Posts: 21760
102
Eclipse IDE Spring VI Editor Chrome Java Ubuntu Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to Use Tabbed Panes. It has exactly such an example.
 
Tay Thotheolh
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, Rob. As you may have noticed from my codes I posted, I did integrate those sample codes into my own codes and did some modification to suit my own application but somehow this modified codes did not work so well as I want it to.
 
Tay Thotheolh
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for all the help. I relooked at the codes multiple times and did some changes and it worked.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!