From the course: Learning Eclipse

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Executing a Swing app

Executing a Swing app

From the course: Learning Eclipse

Start my 1-month free trial

Executing a Swing app

- [Instructor] Continuing our development of the Swing application we are now ready to add the buttons and button listeners to the panel. So I will start by creating our first button listener for the save button. And we'll create a new instance of this button listener. And I will copy and paste this twice and modify it for undo online 64 and online 65 redo. So now let's go ahead and move onto our next line which will be to create a new instance of a J button, and we'll do this for save. Then we will add our listener which we call save listener. And now let's copy these two lines and repeat them for undo and redo. That's undo, and now line 73 redo. And the same for line 74. And most importantly is we display the buttons, and we do that by adding the instance of our buttons starting off with save. And doing the same for undo and redo. Alright, and our last step is to add the panel to the frame that will show on the screen. And we do this by typing this dot add panel, and our panel is…

Contents