• Post Reply Bookmark Topic Watch Topic
  • New Topic

Changing Some Properties In A JTable  RSS feed

 
Mostafa Ahmad
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello

I have made a code that contains a jTable using netbeans GUI builder. But I have some questions about changing some default behaviour of the jTable.

1- my current jTable has 2 columns. The default appearance is that the first column has the same width of the second column. I need the first column to be with less width, and the second one to be with greater width. how to change this using coding or either graphically from netbeans GUI Builder ?

2- I made the first column to be non editable, and I want to make it non selectable too (the first column only). This means, that when I press TAB, I want the focus changes from first cell in second column to second cell in second column and so on. How to achieve this too?
 
Campbell Ritchie
Marshal
Posts: 55785
164
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there anything in the Java™ Tutorials that helps you? I have forgotten just about everything I ever knew about tables, but we usually discuss them in the GUIs forum. Moving discussion.
 
Mostafa Ahmad
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Campbell Ritchie wrote:Is there anything in the Java™ Tutorials that helps you? I have forgotten just about everything I ever knew about tables, but we usually discuss them in the GUIs forum. Moving discussion.


thanks, I will have a look, but actually the matter seemed tricky to me because the netbeans does not support this in builder, and also I did not find what I want when I googled, so I thought that there might be some users here who may tell me how to do this modification.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!