Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/mobile
Path: blob/master/src/demo/share/jfc/SwingSet2/README.txt
41149 views
1
SwingSet2 demonstrates some of the abilities of the Swing User Interface
2
Toolkit by displaying many of the components in a single showcase application.
3
Use it to try out different components and features provided by Swing.
4
5
6
==================================
7
TO RUN SWINGSET2 AS AN APPLICATION
8
==================================
9
10
java -jar SwingSet2.jar
11
12
13
=============================
14
TO RUN SWINGSET2 AS AN APPLET
15
=============================
16
17
appletviewer SwingSet2.html
18
19
=========================
20
TO MODIFY/BUILD SWINGSET2
21
=========================
22
23
The full source for the SwingSet2 demo can be found in the "src"
24
subdirectory. If you wish to play with the source code and try
25
out your changes, you can compile and run in this "src" directory:
26
27
javac *.java
28
29
java SwingSet2
30
31
You may notice a difference when running SwingSet from your compiled source
32
(versus running from the packaged JAR file), in that it won't show the
33
splash screen. This is expected, as the splash screen is shown using the
34
java.awt.SplashScreen support, which allows specifying a splash screen
35
image as an attribute in the JAR's manifest file. If you'd like to see the
36
splash screen with your own compiled version, you can package your classes
37
into a JAR and specify the splash screen (as outlined in the java.awt.SplashScreen
38
documentation) or you can specify the splash screen image on the command line:
39
40
java -splash:resources/images/splash.png SwingSet2
41
42
43
Note: These instructions assume that this installation's versions of the java,
44
appletviewer, and javac commands are in your path. If they aren't, then you should
45
either specify the complete path to the commands or update your PATH environment
46
variable as described in the installation instructions for the
47
Java(TM) SE Development Kit.
48
49