Results 1 to 2 of 2

Thread: Custom Jtable

  1. #1
    tcms is offline Member
    Join Date
    May 2013
    Posts
    43
    Rep Power
    0

    Default Custom Jtable

    Hello everyone,

    Why edited JTable needs JScrollPane to make the columns name visible?

    Cheers

  2. #2
    jim829 is offline Senior Member
    Join Date
    Jan 2013
    Location
    Northern Virginia, United States
    Posts
    3,602
    Rep Power
    5

    Default Re: Custom Jtable

    It doesn't need a JScrollPane. It just makes it easier for you. The following is from the tutorials.

    If you are using a table without a scroll pane, then you must get the table header component and place it yourself. For example:

    container.setLayout(new BorderLayout());
    container.add(table.getTableHeader(), BorderLayout.PAGE_START);
    container.add(table, BorderLayout.CENTER);
    Regards,
    Jim
    The Java™ Tutorial | SSCCE | Java Naming Conventions
    Poor planning our your part does not constitute an emergency on my part.

Similar Threads

  1. Inserting rows to jtable with custom model
    By d3n1s in forum AWT / Swing
    Replies: 6
    Last Post: 06-08-2011, 05:16 PM
  2. Adding custom Jtable to GUI in nested class
    By smallmos1 in forum New To Java
    Replies: 1
    Last Post: 03-16-2011, 12:55 PM
  3. Replies: 2
    Last Post: 02-07-2011, 03:01 PM
  4. Returning a ResultSet to custom JTable Model
    By Kenjitsuka in forum New To Java
    Replies: 9
    Last Post: 10-16-2010, 09:17 PM
  5. Facing the Problem When I placed my Custom ComboCheckBox in JTable cell
    By miryala.rahul@gmail.com in forum AWT / Swing
    Replies: 0
    Last Post: 06-26-2010, 03:14 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •