Moved Windows class inside the SpaceShipSim class (for file simplicity).

This commit is contained in:
Deathsbreed 2014-10-10 11:48:32 -05:00
parent 7ed497892b
commit 83e84ba74c
3 changed files with 7 additions and 17 deletions

View File

@ -11,7 +11,7 @@
<target name="compile" > <target name="compile" >
<mkdir dir="${classes.dir}" /> <mkdir dir="${classes.dir}" />
<javac srcdir="${src.dir}" destdir="${classes.dir}" /> <javac includeantruntime="false" srcdir="${src.dir}" destdir="${classes.dir}" />
</target> </target>
<target name="jar" depends="compile" > <target name="jar" depends="compile" >

View File

@ -115,5 +115,11 @@ public class SpaceShipSim {
frame.setJMenuBar(menuBar); frame.setJMenuBar(menuBar);
} }
public class Window {
public Window(String title, String msg) {
JOptionPane.showMessageDialog(null, msg, title, JOptionPane.INFORMATION_MESSAGE);
}
}
public static void main(String[] args) { new SpaceShipSim(); } public static void main(String[] args) { new SpaceShipSim(); }
} }

View File

@ -1,16 +0,0 @@
package spaceshipsim;
import javax.swing.*;
/**
* @author Nicolás A. Ortega
* @copyright Nicolás A. Ortega
* @license GNU GPLv3
* @year 2014
*
*/
public class Window {
public Window(String title, String infoMessage) {
JOptionPane.showMessageDialog(null, infoMessage, title, JOptionPane.INFORMATION_MESSAGE);
}
}