jframe mittig positionieren
public class MyFrame {
public MyFrame(String title) {
JFrame frame = new JFrame(title);
frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
int windowWidth = 800; //Breite des Programmfensters in Pixel
int windowHeight = 600; //Höhe des Programmfensters in Pixel
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); //Bildschirmdimensionen in Pixeln holen
frame.setBounds((screenSize.width-windowWidth)/2, (screenSize.height-windowHeight)/2, windowWidth, windowHeight);
frame.setVisible(true);
}
public static void main(String[] args) {
SwingUtilities.invokeLater(new Runnable() {
public void run() {
new MyFrame("Byte-Welt.net");
}
});
}
}
Also in C:
- add border to image android
- slurm array job
- read a document in c getting name from console
- c read a whole string from a file
- error: expected declaration or statement at end of input
- code: 'EADDRINUSE', [0] errno: 'EADDRINUSE', [0] syscall: 'listen', [0] address: '::', [0] port: 5000
- uninstall elgg from hostgtor
- set timezone in debian terminal
- compile opencv program
- powershell list big files
- ModuleNotFoundError: No module named 'cv2'
- C bitwise integer absolute value
- WARNING: QA Issue: rdepends on
- pygame detect click
- plt legend top right outside
- incompatible implicit declaration of built-in function ‘exit’
- how to free memory in c
- what is conio.h
- c program to find number of days in a month using switch case
- fgets c
- classification report to excel
- statement o compare two strings in c
- allocate memory c
- write array of char to file in c