Java Code Examples for java.applet.Applet#start()

The following examples show how to use java.applet.Applet#start() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Loader.java    From osrsclient with GNU General Public License v2.0 6 votes vote down vote up
public Loader(Game g, JPanel gamepanel)
{
	game = g;
	if(game == Game.OSRS)
		gameUrl = "http://oldschool69.runescape.com/";
	else if(game == Game.RS3)
		gameUrl = "http://world1.runescape.com/";
	else
		gameUrl = "http://classic2.runescape.com/plugin.js?param=o0,a0,s0";
	
	try {
		GetParams(new URL(gameUrl));
                       loader  = new Reflector(new URL[]{GamePack});
		applet = (Applet)loader.loadClass(MClass).newInstance();
		applet.setStub(this);
		applet.init();
                       applet.setLayout(null);
                       //applet.setBounds(0, 0, 765, 503);
                       applet.resize(gamepanel.getSize());
		applet.start();
	} catch (IOException | InstantiationException | IllegalAccessException | ClassNotFoundException e1) {
		e1.printStackTrace();
	}
}
 
Example 2
Source File: ClientPanel.java    From runelite with BSD 2-Clause "Simplified" License 5 votes vote down vote up
public ClientPanel(@Nullable Applet client)
{
	setSize(Constants.GAME_FIXED_SIZE);
	setMinimumSize(Constants.GAME_FIXED_SIZE);
	setPreferredSize(Constants.GAME_FIXED_SIZE);
	setLayout(new BorderLayout());
	setBackground(Color.black);

	if (client == null)
	{
		return;
	}

	client.setLayout(null);
	client.setSize(Constants.GAME_FIXED_SIZE);

	client.init();
	client.start();

	add(client, BorderLayout.CENTER);

	// This causes the whole game frame to be redrawn each frame instead
	// of only the viewport, so we can hook to MainBufferProvider#draw
	// and draw anywhere without it leaving artifacts
	if (client instanceof Client)
	{
		((Client)client).setGameDrawingMode(2);
	}
}
 
Example 3
Source File: FileDialogReturnTest.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
public static void main(String[] args) {
    Applet a = new FileDialogReturnTest();
    a.init();
    a.start();
}
 
Example 4
Source File: FileDialogReturnTest.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
public static void main(String[] args) {
    Applet a = new FileDialogReturnTest();
    a.init();
    a.start();
}
 
Example 5
Source File: RegexpFilterTest.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
public static void main(String[] args) {
    Applet a = new RegexpFilterTest();
    a.init();
    a.start();
}
 
Example 6
Source File: FileDialogReturnTest.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
public static void main(String[] args) {
    Applet a = new FileDialogReturnTest();
    a.init();
    a.start();
}
 
Example 7
Source File: FileDialogReturnTest.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
public static void main(String[] args) {
    Applet a = new FileDialogReturnTest();
    a.init();
    a.start();
}
 
Example 8
Source File: FileDialogReturnTest.java    From jdk8u-dev-jdk with GNU General Public License v2.0 4 votes vote down vote up
public static void main(String[] args) {
    Applet a = new FileDialogReturnTest();
    a.init();
    a.start();
}
 
Example 9
Source File: RegexpFilterTest.java    From jdk8u-dev-jdk with GNU General Public License v2.0 4 votes vote down vote up
public static void main(String[] args) {
    Applet a = new RegexpFilterTest();
    a.init();
    a.start();
}
 
Example 10
Source File: FileDialogReturnTest.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
public static void main(String[] args) {
    Applet a = new FileDialogReturnTest();
    a.init();
    a.start();
}
 
Example 11
Source File: RegexpFilterTest.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
public static void main(String[] args) {
    Applet a = new RegexpFilterTest();
    a.init();
    a.start();
}
 
Example 12
Source File: MovedResizedTardyEventTest.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
public static void main(String[] args) {
    Applet a = new MovedResizedTardyEventTest();
    a.start();
}
 
Example 13
Source File: FileDialogReturnTest.java    From jdk8u_jdk with GNU General Public License v2.0 4 votes vote down vote up
public static void main(String[] args) {
    Applet a = new FileDialogReturnTest();
    a.init();
    a.start();
}
 
Example 14
Source File: RegexpFilterTest.java    From jdk8u-jdk with GNU General Public License v2.0 4 votes vote down vote up
public static void main(String[] args) {
    Applet a = new RegexpFilterTest();
    a.init();
    a.start();
}
 
Example 15
Source File: FileDialogReturnTest.java    From jdk8u-jdk with GNU General Public License v2.0 4 votes vote down vote up
public static void main(String[] args) {
    Applet a = new FileDialogReturnTest();
    a.init();
    a.start();
}
 
Example 16
Source File: RegexpFilterTest.java    From jdk8u_jdk with GNU General Public License v2.0 4 votes vote down vote up
public static void main(String[] args) {
    Applet a = new RegexpFilterTest();
    a.init();
    a.start();
}
 
Example 17
Source File: FileDialogReturnTest.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
public static void main(String[] args) {
    Applet a = new FileDialogReturnTest();
    a.init();
    a.start();
}
 
Example 18
Source File: RegexpFilterTest.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
public static void main(String[] args) {
    Applet a = new RegexpFilterTest();
    a.init();
    a.start();
}
 
Example 19
Source File: RegexpFilterTest.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
public static void main(String[] args) {
    Applet a = new RegexpFilterTest();
    a.init();
    a.start();
}
 
Example 20
Source File: FileDialogReturnTest.java    From dragonwell8_jdk with GNU General Public License v2.0 4 votes vote down vote up
public static void main(String[] args) {
    Applet a = new FileDialogReturnTest();
    a.init();
    a.start();
}