In Java, to create and show a new JFrame, I simply do this:
public static void main(String[] args) {
new MyCustomFrameClass().setVisible(true
This line is modifying a Swing component since your custom frame is a subclass of JFrame:
new MyCustomFrameClass().setVisible(true);
Generally, you should never modify a Swing component unless you are on the Event Dispatch Thread (EDT).
The following code will run whatever is in the Runnable on the EDT.
EventQueue.invokeLater(Runnable);
Now, the setVisible(true) call will be on the EDT as it should.