facebook

Table Header not visible

  1. MyEclipse Archived
  2.  > 
  3. Matisse/Swing UI Development
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #268052 Reply

    Chris
    Member

    I have a frame with a simple table. I’ve created a custom table model; it contains data for the table rows and also contains data for the header labels. I can see the rows of data but no header information.

    I’ve tried lots of different approaches but I can’t get the headers showing.

    I’m not sure what I’m doing wrong as I’ve managed to get this working before without using matisse.

    Chris

    #268076 Reply

    Riyad Kalla
    Member

    Chris,
    For a JTable’s header to render you have to place the JTable inside of a JScrollPane. See if that does the trick.

    #268088 Reply

    Chris
    Member

    Thanks, I tried this last night and it worked fine. I have one more question though. How do you limit the size of text fields in the properties window>

    Thanks again,

    Chris

    #268091 Reply

    Riyad Kalla
    Member

    Chris,
    Do you mean how much text can be input, or how big the field physically is on the UI? If you meant the former, you need a document listener to cap it and likely issue a System beep when it’s full, for the latter you can set the min/max and preferred sizes

    #268100 Reply

    Chris
    Member

    Hi,
    I meant the former. Thanks I will try a document listener.

    chris

Viewing 5 posts - 1 through 5 (of 5 total)
Reply To: Table Header not visible

You must be logged in to post in the forum log in