Question: //java programming; Joyce Farrell; 8th ed //debugging exercises //output, need to fix //chapter 15 Advance GUI 1 // Demonstrates layout positions 2 // using BorderLayout

//java programming; Joyce Farrell; 8th ed

//debugging exercises //output, need to fix

//chapter 15 Advance GUI

1 // Demonstrates layout positions 2 // using BorderLayout 3 import javax.swing.*; 4 import java.awt.*; 5 import java.awt.event.*; 6 public class DebugFifteen2 extends JFrame 7 { 8 JButton nb = new JButton("Left "); 9 JButton sb = new JButton("Down "); 10 JButton eb = new JButton("Right "); 11 JButton wb = new JButton("Center "); 12 JButton cb = new JButton("Up"); 13 Container con = null; 14 15 public DebugFifteen2() 16 { 17 con = this.getContentPane(); 18 con.setLayout(new BorderLayout()) 19 con.add(nb); 20 con.add(sb); 21 con.add(eb); 22 con.add(wb); 23 con.add(cb); 24 } 25 public static void main(String[] args) 26 { 27 DebugFifteen2 f = new DebugFifteen2(); 28 f.setSize(300, 300); 29 f.setVisible(true); 30 } 31 }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!