BusMan29 wrote:Classes rarely have such high level methods. It wouldn't be very effective. It doesn't mean that the same effect couldn't be achieved however, you just need to write the code yourself.
Moreover, I cannot find the Freeze Screen function in JTable. Is JTable have this function?
BusMan29 wrote:Probably with custom rendering at least. But the issue here is can you do it, without having someone write the code for you? It's somewhat advanced, and if you're new to java, it might be difficult for you.
I just want to freeze the first and the last columns. Is it possible?
Moreover, I just use the code provide from the tutorial and I do not know why it could not show the header and the ComboBox as the code should show.Hard to say, are there any exceptions? Are you absolutely sure you're running the same code as in the example? Even examples have bugs sometimes.
Kayaman wrote:Am I blind or is the "visual index to Swing components" or whatever it was called part of the tutorial missing in action?
I'd advise on reading the Swing tutorial to understand how Swing works first.
BusMan29 wrote:The tutorial says so:
Sorry! I had made some of the mistakes and are corrected and bold. Thank you for your attention.
I found that the [Oracle Java JTable Tutorial|http://docs.oracle.com/javase/tutorial/uiswing/components/table.html] have the same problem too. The 1st demo could not show the JCheckBox while others does. Any of you have the same problem too?
The advantage of these constructors is that they are easy to use. However, these constructors also have disadvantages:
They automatically make every cell editable.
They treat all data types the same (as strings). For example, if a table column has Boolean data, the table can display the data in a check box. However, if you use either of the two JTable constructors listed previously, your Boolean data > is displayed as a string. You can see this difference in the Vegetarian column of the previous figure.
BusMan29 wrote:aybe this could be your solution:
1. May I add a JButton at the end of each row in JTable?
2. Is there any limitation in using the JScrollPane?Could you please give a SSCCE?
Horizontal or vertical. The cells could not show all the digits.
It did not show the horizontal scroll bar in JTable.