Scrollable « JTable « Java Swing Q&A





1. Scrollable JTable    coderanch.com

I don't see what's wrong with this code. I created this test program and it ran fine import javax.swing.*; import java.awt.*; import java.awt.event.*; public class TableTest extends JFrame { public TableTest() { super(); Container c = getContentPane(); c.setLayout(new FlowLayout() ); Object[][] data = { {"", ""}, {"", ""}, {"", ""}, {"", ""}, {"", ""}, {"", ""}, {"", ""}, {"", ""}, {"", ...

3. How to make a JTable scrollable?    forums.oracle.com

I don't want to create a new topic for my question, so I will post my question in this post. Suppose I add another column in my JTable (a fourth column) that returns a String value depending on the sport type (third column). For example, if the user's choice is "Snowboarding", the String value will be "Good choice" or else the ...

4. How do I customize the look of my JTable in a scrollable pane    forums.oracle.com

When I have a JTable in a scrollable pane, there is an annoying blue border that I want to get rid of. I would also like it if, even if there are no entries in the table, the column heads would still show up. Finally, I want to change the background of the table so it is not the grey-ish color ...