How can I Define a JFrame subclass that has four vertically positioned buttons. The labels for the four buttons are Senior, Junior, Sophomore, and Freshman. When a button is clicked, display a message that identifies which button is clicked, using JOptionPane.
charpays
0
Newbie Poster
Recommended Answers
Jump to PostUse a GridLayout. You can change which Layout Manager netbeans is using by right clicking on the form, I think. Your GridLayout should use 1 row and 1 column, that way the buttons will be displayed vertically. Then just use the palette to add 4 buttons. Netbeans will automatically arrange …
All 2 Replies
Reply to this topic
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.