Java:
import java.io.IOException;
import java.sql.SQLException;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.jdesktop.application.Application;
import org.jdesktop.application.SingleFrameApplication;
/**
* The main class of the application.
*/
public class CockApp extends SingleFrameApplication {
/**
* At startup create and show the main frame of the application.
*/
@Override protected void startup() {
try {
show(new CockView(this));
} catch (SQLException ex) {
Logger.getLogger(CockApp.class.getName()).log(Level.SEVERE, null, ex);
} catch (IOException ex) {
Logger.getLogger(CockApp.class.getName()).log(Level.SEVERE, null, ex);
}
}
/**
* This method is to initialize the specified window by injecting resources.
* Windows shown in our application come fully initialized from the GUI
* builder, so this additional configuration is not needed.
*/
@Override protected void configureWindow(java.awt.Window root) {
}
/**
* A convenient static getter for the application instance.
* @return the instance of CockApp
*/
public static CockApp getApplication() {
return Application.getInstance(CockApp.class);
}
/**
* Main method launching the application.
*/
public static void main(String[] args) {
launch(CockApp.class, args);
}
}
Hallo leute ich habe diesen Code gefunden um meiner Anwendung ein anderes Design zu geben .
Gibt es noch eine Kürzere varainte als diese?
Und zum anderen möchte ich mein View nicht von FrameView ableiten sondern von JFrame.
Hat jemand dazu einen Code?
Ich will einfach nur dem Swing Layout ein anderes Design verpassen, danke grüße
Zuletzt bearbeitet: