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.*;
import java.awt.event.*;
import javax.swing.*;
import java.io.*;
public class Fenster extends Frame implements ActionListener
{
public Fenster ()
{
super (" Lernpaket ");
Button one = new Button (" Test");
Button two = new Button (" Video");
Button three = new Button (" Test");
FlowLayout Buttons = new FlowLayout (FlowLayout.CENTER);
Panel pane = new Panel (Buttons);
pane.setLayout(Buttons);
Label L = new Label ("PROJEKT FA ST EM ");
add(pane);
addWindowListener(new WindowAdapter(){
public void windowClosing(WindowEvent e)
{
dispose();
System.exit(0);
}
});
one.addActionListener(this);
two.addActionListener(this);
three.addActionListener(this);
pane.add(L);
pane.add(one);
pane.add(two);
pane.add(three);
one.setBackground(Color.pink);
two.setBackground(Color.pink);
three.setBackground(Color.pink);
L.setFont (new Font ("Monospaced", Font.BOLD,30));
setSize (500, 200);
setBackground(Color.white);
setVisible (true);
}
public static void main(String arg[])
{
new Fenster();
}
public void actionPerformed(ActionEvent e)
{
if(e.getSource()==one)
{
try {
Runtime.getRuntime().exec("C:\\Programme\\QickTime\\QuickTimePlayer.exe Sample.mov");
} catch( IOException ex) {
// ...
}
}
}
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.io.*;
public class Fenster extends Frame implements ActionListener
{
Button one = new Button (" Test");
Button two = new Button (" Video");
Button three = new Button (" Test");
public Fenster ()
{
super (" Lernpaket ");
FlowLayout Buttons = new FlowLayout (FlowLayout.CENTER);
Panel pane = new Panel (Buttons);
pane.setLayout(Buttons);
Label L = new Label ("PROJEKT FA ST EM ");
add(pane);
addWindowListener(new WindowAdapter(){
public void windowClosing(WindowEvent e)
{
dispose();
System.exit(0);
}
});
one.addActionListener(this);
two.addActionListener(this);
three.addActionListener(this);
pane.add(L);
pane.add(one);
pane.add(two);
pane.add(three);
one.setBackground(Color.pink);
two.setBackground(Color.pink);
three.setBackground(Color.pink);
L.setFont (new Font ("Monospaced", Font.BOLD,30));
setSize (500, 200);
setBackground(Color.white);
setVisible (true);
}
public static void main(String arg[])
{
new Fenster();
}
public void actionPerformed(ActionEvent e)
{
if(e.getSource()==one)
{
try {
Runtime.getRuntime().exec("C:\\Programme\\QickTime\\QuickTimePlayer.exe Sample.mov");
} catch( IOException ex) {
// ...
}
}
}