JTable header not visible

View: New views
3 Messages — Rating Filter:   Alert me  

JTable header not visible

by Fabrizio Pollastri-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Consider the following code for jython 2.5.1 on Linux.

from javax import swing
root = swing.JFrame('test',size=(100,100),defaultCloseOperation =
swing.JFrame.EXIT_ON_CLOSE)
root.add(swing.JTable([[1],[3],[5]],['numbers']))
root.show()

The table is displayed as expected, but the table header with 'numbers'
does not appear.
What is wrong? Thank you in advance for any help.

F. Pollastri

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Jython-users mailing list
Jython-users@...
https://lists.sourceforge.net/lists/listinfo/jython-users

Re: JTable header not visible

by Alex Grönholm-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Fabrizio Pollastri kirjoitti:

> Consider the following code for jython 2.5.1 on Linux.
>
> from javax import swing
> root = swing.JFrame('test',size=(100,100),defaultCloseOperation =
> swing.JFrame.EXIT_ON_CLOSE)
> root.add(swing.JTable([[1],[3],[5]],['numbers']))
> root.show()
>
> The table is displayed as expected, but the table header with 'numbers'
> does not appear.
> What is wrong? Thank you in advance for any help.
>
> F. Pollastri
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> _______________________________________________
> Jython-users mailing list
> Jython-users@...
> https://lists.sourceforge.net/lists/listinfo/jython-users
>  


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Jython-users mailing list
Jython-users@...
https://lists.sourceforge.net/lists/listinfo/jython-users

Re: JTable header not visible

by Alex Grönholm-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Alex Grönholm kirjoitti:

> Fabrizio Pollastri kirjoitti:
>  
>> Consider the following code for jython 2.5.1 on Linux.
>>
>> from javax import swing
>> root = swing.JFrame('test',size=(100,100),defaultCloseOperation =
>> swing.JFrame.EXIT_ON_CLOSE)
>> root.add(swing.JTable([[1],[3],[5]],['numbers']))
>> root.show()
>>
>> The table is displayed as expected, but the table header with 'numbers'
>> does not appear.
>> What is wrong? Thank you in advance for any help.
>>
>>    
Gah, sorry for the earlier mishap.
Table headers only appear when you put the table inside a JScrollPane,
as you should always do with tables.

>> F. Pollastri
>>
>> ------------------------------------------------------------------------------
>> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
>> is the only developer event you need to attend this year. Jumpstart your
>> developing skills, take BlackBerry mobile applications to market and stay
>> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
>> http://p.sf.net/sfu/devconference
>> _______________________________________________
>> Jython-users mailing list
>> Jython-users@...
>> https://lists.sourceforge.net/lists/listinfo/jython-users
>>  
>>    
>
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> _______________________________________________
> Jython-users mailing list
> Jython-users@...
> https://lists.sourceforge.net/lists/listinfo/jython-users
>  


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Jython-users mailing list
Jython-users@...
https://lists.sourceforge.net/lists/listinfo/jython-users