Computer Science Canada

jbutton border

Author:  raptors892004 [ Sat Dec 30, 2006 2:13 pm ]
Post subject:  jbutton border

Is there any way to change the color of/put in a border for a JButton?

Author:  raptors892004 [ Sat Dec 30, 2006 2:31 pm ]
Post subject: 

I found how to set a border but now how do I reset it back to the JButton default one?

Author:  ericfourfour [ Sat Dec 30, 2006 2:39 pm ]
Post subject: 

Try setBorder (null). I don't know if it works but it might.

Author:  raptors892004 [ Sat Dec 30, 2006 3:10 pm ]
Post subject: 

I tried setting it to null but then the problem is if I want to print out the border (toString() ) its a null pointer exception. Not that I would need to print it out but I tried using other borders like EmptyBorder. Thanks for the reply anyways Smile


: