Question: a. Write an application that extends JPanel and displays your name. Place boxes of different colors around your name at intervals of 10, 20, 30,
a. Write an application that extends JPanel and displays your name. Place boxes of different colors around your name at intervals of 10, 20, 30, and 40 pixels. Save the file as JBorderPanel.java.
b. Modify the JBorderPanel program so that when the user enters any name in a JTextField, the name is displayed with borders at intervals of 10, 20, 30, and 40 pixels. Save the file as JBorderPanel2.java.
Step by Step Solution
3.50 Rating (157 Votes )
There are 3 Steps involved in it
a import javaxswing import javaawt import javaawtColor public class JBorderPanel extends JPanel String myName new StringJoyce Font serifItalic new Fon... View full answer
Get step-by-step solutions from verified subject matter experts
