Hi, everyone! I used JButtons in a game I'm coding (Battleship!!!). The board is made of JButtons that change color when they are clicked, however, I cannot see them change color on my mbp but I see them change color on my pc. I'm using Eclipse...any suggestions so I can get it to display the color change?
-
-
This is a question for a java developer who happens to own a Mac.
I am a java developer but I don't own a Mac (yet). The only thing I can suggest is that you should play with the button properties on OSX. Are you running your game as an applet or did you install Eclipse or another IDE on OSX? I assume you are using Swing. What L&F do you use? There are a zillion details that you left out. A screenshot would be good too.
I think it would be best to install your dev environment on OSX, in case you didn't already do it. -
try "net beans" , and be sure that ur JDK is fully updated , some times eclipse have weird problems
on mac , i was just making battle ship 2 weeks ago as my java project , its the easiest game out there that will let u learn new stuff in java for beginner .
-
I'm using eclipse, Swing and I don't know what L&F is or a dev environment. I got it to work by setting each button to .setOpaque(true) and then .setBackground(Color.green); and it worked. I'm only in AP Comp Sci so up until now, most ide details have been unnecessary for me to be aware of.
-
what is ur osx version?
Java buttons and OSX
Discussion in 'Apple and Mac OS X' started by budgiemaster, Jun 10, 2010.