• Advertisement

Archived

This topic is now archived and is closed to further replies.

[java] JSlider problem

This topic is 5995 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey, I have a problem with JDK1.3 When I try to place a JSlider on one of my JInternalFrames it doesn''t appear. There''s no move knob, no ticks,... The only thing that says there should be one is when I change the background color of the slider to a different one as my frame background that is visible, so I have an empty white rectangle where the slider should be on a gray frame background. Anyone knows why this happens and how I can solve it? Is it because I use JInternalFrames? (I use Forte CE 2.0 as editor) Thanks in advance! ****************************** Stefan Baert On the day we create intelligence and consciousness, mankind becomes God. On the day we create intelligence and consciousness, mankind becomes obsolete... ******************************

Share this post


Link to post
Share on other sites
Advertisement
Things to check:

Are you using the Container provided by JInternalFrame.getContentPane()?
Are you setting the layout and adding the slider to that Container?
Are you doing anything weird like forcing repaints or passing around your own Graphics object?

If none of these are the case, post some code so we can take a look. What you''re describing should work fine.

"If consquences dictate our course of action, it doesn''t matter what''s right, it''s only wrong if you get caught."
- Tool

Share this post


Link to post
Share on other sites
Thanks WayfarerX,

I found the problem in the meantime. Just happens that I set the bounds too small and if the slider can''t be drawn entirely into the bounds you provide, Java decides that it just doesn''t draw a thing instead of part of the control.

Greetz,

******************************
Stefan Baert

On the day we create intelligence and consciousness, mankind becomes God.
On the day we create intelligence and consciousness, mankind becomes obsolete...
******************************

Share this post


Link to post
Share on other sites
One of the reasons to use layout managers, they watch a Component''s minimum-size attribute.

"If consquences dictate our course of action, it doesn''t matter what''s right, it''s only wrong if you get caught."
- Tool

Share this post


Link to post
Share on other sites

  • Advertisement