- Open File Chooser.
- Save File Chooser.
CODING:
import javax.swing.*;import java.awt.*;
class myjframe1 extends JFrame
{
public myjframe1()
{
setTitle("Open FileChooser");
setSize(300, 200);
setVisible(true);
setDefaultCloseOperation(EXIT_ON_CLOSE);
JFileChooser open = new JFileChooser();
int option = open.showOpenDialog(this);
}
}
class simpframe
{
public static void main(String args[])
{
myjframe1 x= new myjframe1();
}
}
No comments:
Post a Comment