Solved

Write a Set of Code That Will Allow a User

Question 64

Essay

Write a set of code that will allow a user to select an input image and then place this image in a JLabel lab1 and add lab1 to a JPanel as the northern component in a JFrame using BorderLayout. The JFrame has already been instantiated as jf and the BorderLayout already established. Hint: a JFileChooser returns a File and JLabel requires the String name of a file as an argument. A File can return its name using File class' method getAbsolutePath( )

Correct Answer:

verifed

Verified

JFileChooser jfc = new JFileChooser( );
...

View Answer

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions