Padding « Layout « Java Swing Q&A





1. Zero-padding a spinner in Java    stackoverflow.com

How do you add zero padding to a JSpinner?
Since the spinner creates the JFormattedTextField itself, I can't just pass the format into the JFormattedTextField constructor.
Isn't there a way to ...

2. GridBagLayout padding    stackoverflow.com

I am using a GridBagLayout to (currently) display two rows. I am aware this layout is overkill for this task, but am trying to learn how to use it. The problem ...

3. Piano Keys in Swing Layout: Left-Padding?    stackoverflow.com

I am creating a container of JComponents which will look like a piano keyboard. The black keys look like this (Groovy)

def setBlackNotes(buttons) {
    def octaves = (int)(buttons.size() / ...

4. Java Swing - JPanel and GridLayout Margins/Padding    stackoverflow.com

I'm working on building a chess game in Java, and I'm currently having a bit of trouble getting the GUI exactly the way I want it with Swing. I'm using ...

5. Margin/padding in GridBagLayout Java    stackoverflow.com

1 question) Is it possible to set an margin/padding in GridBagLayout for the whole row/column? I use the inset on the constraints-object however, using this approach I need to set padding ...

6. Java: remove margin / padding on a JTabbedPane    stackoverflow.com

I'd like to know how to remove the margins between my JtabbedPane and my JFrame content pane and between my JTabbedPane and its internal JPanel. I circled the margins I want to ...

7. JPanel Padding in Java    stackoverflow.com

I have a formatting question for my Java swing application. It should be fairly straightforward, but I am having difficulty finding any aid (Every topic seems to be regarding removing any ...

8. My JComponents are hogging too many pixels    stackoverflow.com

I am trying to prune off unecessary pixels on an existing Java Swing UI. It uses GridbagConstrains mostly, but some other LayoutManagers too. A lot of the components are just added ...

9. jscrollpane: how to accommodate for padding of div element? (PLUS discovery on dealing with images)    stackoverflow.com

If any one could help: How can a get jscrollpane to "deal properly" with my div element that has no set height, and has padding (top and bottom) applied to it? ...





10. Padding Controls    coderanch.com

Forgive my ignorance but I seldom work with Java GUI's and, when I do, I usually end up relearning all of the basics because it's been so long since I've last worked with it. Anyway, I have what I assume will be a very simple question. I have a very simple GUI and everything is just as I'd like it except ...

11. Adding padding to GUI components    coderanch.com

12. GridBagLayout padding question    coderanch.com

Ive got three panels, each one inside of the next. The second one fits snugly into the first, with no border around the edge, but the third does not fit into the third so smoothly - there is a big blank box in the middle of it. Im not doing anything differently when putting the third into the second than I ...

13. Add padding to large images    coderanch.com

I have a little program that slices up an image and part of the process requires varying amounts of padding be added around the image to ensure the tiles are the correct size and to ensure they line up with other images; the method I am currently using, as seen below, works to get the proper padding around the image. My ...

14. Single Component Padding    java-forums.org

Hi Everyone, I'm learning Java this semester at school and I'm trying to build a simple component. Basically it's a numeric label that, when clicked, switch to a textfield to let you modify the value, or if you "click-drag" the label, you can "scroll" the value like a slider. I've set up a textfield and a label in a JPanel with ...

15. Vertical padding problem    java-forums.org