Create two buttons with button text "Button-1" and "Button-2" and put them in a frame using FlowLayout. Use pack () method to discard any whitespaces while putting those buttons in the frame. When you click on the "Button-1" it should display a message ("You clicked Button-1") in a popup window and when you click on the "Button-2" it should display a message ("You clicked Button-2")
Comments
Leave a comment