I have a doubt in JTable. i created one long JTable.it can display correctly.but i can change the resolution in windows XP operating system, the whole table is not displayed properly.. i mean cut off at the top and bottom sides.
1280x1024 – table with print, ok buttons are displayed with loss of some information
1024x768 – table displayed with print and ok buttons are not displayed.
More information please.
1) Are you changing the resolution while the table is being displayed? If yes, can you close the UI, change the resolution and bring up the UI again? Does it make any difference?
2) Are you any using layout manager for your table's parent container? If yes, which one?
The problem may not necessarily your JTable. Given you change your screen resolution while the GUI is opened may indeed affect the resizing.
As Maneesh indicated are you using layout managers? is the JTable inside a JScrollPane? Are the table columns auto-resized using JTable's setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS);? is the scrollable view set JTable's setPreferredScrollableViewportSize(new Dimension(width, height));? If all these are done then you should be fine.
K. Tsang CEng MBCS PMP PMI-ACP OCPJEA OCPJP
posted 10 years ago
I have a large panel in which i want to display a jtable along with some labels and two buttons named print and cancel on it.here i have used border layout for the panel.i am changing the resolution after the rows can be filled into the table.i attached the screen shots so that you got some idea.i am using windows xp operating system.
1280x1024 – table with print, ok buttons are displayed by lables and butttons info not
1024x768 – table with print and ok buttons are not displayed