tags:

views:

24

answers:

1

I have a Jpanel that is used for displaying messages. When mouse enters a JLabel it expands to normal size and when mourse leaves it disappear.

There are overlaps between JTable and JPanel when the JPanel expands to normal size. As JTable's height cannot be changed during runtime only way I can think of is let JPanel stay on top of JTable.

I am very new to Java ans swing. Any idea please?

A: 

Sound like you should be using a tool tip.

Edit:

Try using a BorderLayout. Add your main panel to the CENTER and your message panel to the SOUTH. When you make the message panel visible you can revalidate() the main panel and the Center panel will shrink in size to take whatever space is not required by the south panel.

camickr
Thanks but there may be more than 1 message. And messages are in some format. Tool tips are no use here.
David
David - how can there be more than one message displayed if they're only enlarged when the mouse is over them?
I82Much
I am not familiar with Borderlayout therefore I didn't try your idea. But still a billion thanks to your time and reply.
David