This content has been marked as final. Show 2 replies
You can't change the system date with pure Java. You'll have to use JNI or invoke an external program with Runtime.exec.
Even if you could do it with Java, you wouldn't "use" JFrame to do it. You might have a button in the JFrame whose listener invokes a method that would do it, but to think of that as "using JFrame to change the system date" is do ignore the division of responsiblity that is critical to any well-designed program.