Alright, well, this is my 2nd post so far... My first problem was easily repaired ( I incremented an i instead of j in one of my for loops... lol ). But this problem is a little more, how can I say, not a visual mistake, but a implementation thing...

Again, this is the minesweeper game I'm trying to do... Here's my problem, best explained with a picture: (i guess img tags dont work)
[img]http://img182.imageshack.us/img182/2003/jbuttonyr6.jpg[/img]

I'm trying for the picture on the right with small boxes and regular font text, but it seems like I need each button to be a certain width to fit anything in there.. Is there a way to change that so the text fits perfectly, centered inside each button without the cap on width? The hight seems to not matter in this case, which is weird to me...

Any advice? Again, each one of those boxes are JButton. I am using b.setText("") to enter the text into the buttons when a click is heard.

Recommended Answers

All 2 Replies

wow... This always happens... I figured it out..

For anyone else wondering/later searches:
BUTTON.setMargin(new Insets(0,0,0,0));
fixes the problem...

Nice one.
Can you please mark this post as solved? Below last post is link that reads "Mark as solved" or something like that, thanx...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.