- Joined
- Apr 13, 2008
- Messages
- 91
- Reaction score
- 1
My friend made me a program for my dad's office that takes all their files in a directory and organizes them by the last modified date. I was wondering if I could incorporate the .class file into a basic JFrame instead of it running in a CMD. Here is a basic JFrame from my Java book.
I'm not sure if it will work with that, but anyways. The program in cmd asks for the directory and then it organizes that one.
Code:
import javax.swing.JFrame;
class ShowAFrame {
public static void main(String args[]) {
JFrame myFrame = new JFrame ();
String myTitle = "File Organizer";
myFrame.setTitle(myTitle);
myFrame.setSize(300, 300);
myFrame.setDefaultCloseOperation
(JFrame.EXIT_ON_CLOSE);
myFrame.setVisible(true);
}
}
I'm not sure if it will work with that, but anyways. The program in cmd asks for the directory and then it organizes that one.