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.
/*
* Created on 04.11.2004
*/
package de.tutorials;
import java.awt.BorderLayout;
import java.io.File;
import java.io.IOException;
import java.net.MalformedURLException;
import javax.swing.JEditorPane;
import javax.swing.JFrame;
import javax.swing.JScrollPane;
/**
* @author Darimont
*
*/
public class Test46 extends JFrame {
private JEditorPane pane;
public Test46() {
super("Test46");
setDefaultCloseOperation(EXIT_ON_CLOSE);
pane = new JEditorPane();
pane.setContentType("text/plain");
try {
pane.read(new File("c:/rptTest.html").toURL().openStream(), null);
} catch (MalformedURLException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
getContentPane().add(new JScrollPane(pane), BorderLayout.CENTER);
setVisible(true);
pack();
}
public static void main(String[] args) {
new Test46();
}
}