Folge dem Video um zu sehen, wie unsere Website als Web-App auf dem Startbildschirm installiert werden kann.
Anmerkung: Diese Funktion ist in einigen Browsern möglicherweise nicht verfügbar.
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.*;
public class OptionPaneExample extends JFrame implements ActionListener {
private JButton btn = new JButton("Show Message!");
public OptionPaneExample() {
this.setTitle(this.getClass().getCanonicalName());
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
this.setAlwaysOnTop(true);
this.setLocationByPlatform(true);
this.add(btn);
btn.addActionListener(this);
this.pack();
this.setVisible(true);
}
public void actionPerformed(ActionEvent e) {
JOptionPane jop = new JOptionPane();
jop.setMessage("Hallo");
JDialog dialog = jop.createDialog(this, "Message");
dialog.setAlwaysOnTop(true);
dialog.setModal(true);
dialog.setVisible(true);
}
public static void main(String[] args) {
new OptionPaneExample();
}
}
...
DMapperReportReadyPanel tmp = new DMapperReportReadyPanel(repFrame);
...
...
public DMapperReportReadyPanel(Frame owner) {
super(owner);
setModal(true);
this.setSize(400, 100);
this.setResizable(true);
this.setTitle("Layername vergabe");
this.setAlwaysOnTop(true);
this.setLocationByPlatform(true);
...
this.setVisible(true);
}
...