NoLiver92
NoLiver92

Reputation: 892

Second Program Window

I am trying to make a plugin for a Minecraft server where I would like to open up a second console window to display other information to the owner.

However I am struggling to find the information I need. I have found hundreds of tutorials on how to create a second program but I want to display it from within another console window.

I have also seen creating a GUI through Swing but I'm not really after a GUI window (unless it's my only option).

Is there a way of opening a second program console window where I can write what I like to it? (basically an information display panel)

Upvotes: 1

Views: 86

Answers (1)

Jake
Jake

Reputation: 26

The best option would be to create a separate GUI window using swing.

The best way I have found in minecraft is to create a separate class which will allow you to keep all the code in one place, inside create your methods for drawing the window and methods for adding information to it.

I would then declare it in the main file as a global variable creating a function for getting the instance. then you can get it from any listener/command handler.

dont forget to close the window when the plugin stops/is restarted otherwise the window will remain while the minecraft server is running.

Upvotes: 1

Related Questions