Is there anyway of actually changing the length of a slider. I have a some sliders in a grid layout and im wondering wether the grid layout will stop the sliders from expanding.
Controls will always take up all available room in a layout manager. That's guaranteed by the AWT API (on which Swing builds).
So your answer is no, you can't prevent the sliders from changing their size.
Darn so how can i make them bigger?! I feel the grid layout might be restricting the size but im not so sure.
A grid layout will give each element in it the exact same horizontal and vertical size.
If you don't want that (for example you want some controls to take up less space, think of a group of very short labels) you will have to use another layout manager that offers more flexibility like GridBagLayout.
Those are of course harder to use because of that greater flexibility.
You can still not control size directly but you can now say that your slider can run across multiple columns.
if you are usign a JSlider you can use setPreferredSize() to change the size, but if you are usign GridLayout then it will not expand over the "cell" you are in. You will have to use multiple layout managers to accomplish this goal while still maintaining your GridLayout