By default, Java classes are opened in a source code editor. You can make the visual editor the default Java editor.
The workbench associates file types with certain editors so that the proper editor opens when you launch a file. For Java files with a .java file extension, the default editor is the basic Java source code editor. Unless you change the default editor in your workbench file association preferences, Java files will not automatically launch in the visual editor.
To make the visual editor the default application for .java files: