0

Alright I have been using the setSize method for the JSlider to try to set it's size but it seems to be having no effect what soever. I have the JSliders instead a JPanel that is using a GridBagLayout, the JPanel is then being adding to another JPanel which uses a GridBag Layout. The second JPanel then functions as the contentArea for a JFrame. I have my JSliders set to Vertical (as for an equalizer) and I need to make them shorter, so I figured using setSize would work, but, as I mentioned, it is not :(.

Thanks for any help you can provide!

3
Contributors
2
Replies
3
Views
11 Years
Discussion Span
Last Post by jwenting
0

setSize has little effect for most controls, it's mainly there to enable resizing of entire windows (and might have been better implemented at a different level in the class hierarchy), you're not supposed to control the size in pixels of user interface controls in Java as they're controlled by the layoutmanager.
This is to make sure it looks decent on whichever operating system your application may run on.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.