1.Consider my code is on some line of a JPanel that I have, am I automatically on EDT?
2.Same question for all other classes which are not belong to GUI, JPanels o
As per my comment: When all else fails, the SwingUtilities class has a static method that you can use: SwingUtilities.isEventDispatchThread()
With regards to number 3) definitely use a background thread.
And as far as I know, there is no "general rule". Yes code in your GUI should be on the EDT, but if you have a bug somewhere, it may not be, though usually it is. Same for Swing listeners.