Java Programming Tutorial - 67 - JRadioButton Final Program
Top Comments
All Comments (75)
-
I knew you needed to know some math to learn how to program well, but no one told me I needed to know how to spell!
-
Great tutorials Bucky! I've been following since the first one to brush up my java skills.
Since itemStateChanged is called twice; once for select and once for deselect, I added this to make sure that the font is set only on select:
if(event.getStateChange()==Ite
mEvent.SELECTED) tf.setFont(font);
-
@ 5:35: I rewatched the video bucky. And you did it again :D.
-
I got Exception(no error) when compile the program:
Exception in thread "main" java.lang.NullPointerException at java.awt.Container.addImpl(Con
tainer.java:1086) at java.awt.Container.add(Contain er.java:998) at javax.swing.JFrame.addImpl(JFr ame.java:562) -
I got Exception(no error) when compile the program:
-
views got low low low low low lol lol ol ;<
-
@izaak791 Wow... First video I see with over 200 likes and 0 dislikes! :D
He deserves it ^^
-
did anybody notice there was no dislike to this video?!! yeeeeah!
-
@12me91 An easier way to think of it is because in the previous tutorials we used if/else statements, in which the fonts were declared within the itemStateChanged method. However, this time the fonts were declared in the GUI constructor, with the radio buttons. Due to this, in order to make the buttons work they need to be made to pass their own independent font variable into the HandlerClass constructor, which can't be done when an object has already been declared.
Hope this helps.
Make a tic tac toe game
walimaster0131 2 years ago 71
dude these tutorials are much appreciated
keep em comin :)
zipzeezip 2 years ago 62