*
The moose likes Swing / AWT / SWT and the fly likes JTable column disappered when clicked on header Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JTable column disappered when clicked on header" Watch "JTable column disappered when clicked on header" New topic
Author

JTable column disappered when clicked on header

rastogi payam
Ranch Hand

Joined: May 09, 2011
Posts: 45

Hi All,

The code below is running fine until I select a checkbox to add a column dynamically in a table. After the new column is added in the table, if I click on the header of the table all the newly added column disappears and the table resets to the initial condition. I think it's because i didn't configure table column listener or something.. please help.

What I want is when we click any checkbox the column should be added/removed accordingly from the table and and when we click table header nothing should happen. On clicking the cell inside the table we should be able to edit it.

>



[Thumbnail for Invoice.jpg]



SCJP 1.6, OCPWCD 5
m Korbel
Ranch Hand

Joined: Jun 19, 2012
Posts: 154
your code useless recreate whole GUI

you can to start with

rastogi payam
Ranch Hand

Joined: May 09, 2011
Posts: 45

Thanks
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: JTable column disappered when clicked on header
 
Similar Threads
urgent:override a jrame
JTable column that can be both editable or non-editable
Null Pointer Exception Help
Change and delete rows in a sql-database
Refreshing a window