gUIsInterface/build.xml
Builds, tests, and runs the project gUIsInterface.
gUIsInterface/manifest.mf
Manifest-Version: 1.0
X-COMMENT: Main-Class will be added automatically by build
gUIsInterface/nbproject/build-impl.xml
Must set src.dir
Must set test.src.dir
Must set build.dir
Must set dist.dir
Must set build.classes.dir
Must set dist.javadoc.dir
...
This PowerPoint helps students to consider the concept of infinity.
gUIsInterfacebuild.xml Builds, tests, and runs the pro.docx
1. gUIsInterface/build.xml
Builds, tests, and runs the project gUIsInterface.
gUIsInterface/manifest.mf
Manifest-Version: 1.0
X-COMMENT: Main-Class will be added automatically by build
gUIsInterface/nbproject/build-impl.xml
2.
3.
4.
5.
6.
7. Must set src.dir
Must set test.src.dir
Must set build.dir
Must set dist.dir
Must set build.classes.dir
Must set dist.javadoc.dir
Must set build.test.classes.dir
Must set build.test.results.dir
Must set build.classes.excludes
Must set dist.jar
28. To run this application from the command line without
Ant, try:
java -jar "${dist.jar.resolved}"
29. Must select one file in the IDE or set run.class
Must select one file in the IDE or set run.class
30. Must select one file in the IDE or set debug.class
Must select one file in the IDE or set debug.class
Must set fix.includes
This target only works when run from inside the NetBeans
IDE.
31. Must select one file in the IDE or set profile.class
This target only works when run from inside the NetBeans
IDE.
This target only works when run from inside the NetBeans
IDE.
This target only works when run from inside the NetBeans
IDE.
32. Must select one file in the IDE or set run.class
Must select some files in the IDE or set test.includes
33. Must select one file in the IDE or set run.class
Must select one file in the IDE or set applet.url
34.
35. Must select some files in the IDE or set javac.includes
Some tests failed; see details above.
36. Must select some files in the IDE or set test.includes
Some tests failed; see details above.
Must select some files in the IDE or set test.class
Must select some method in the IDE or set test.method
Some tests failed; see details above.
Must select one file in the IDE or set test.class
Must select one file in the IDE or set test.class
Must select some method in the IDE or set test.method
37. Must select one file in the IDE or set applet.url
Must select one file in the IDE or set applet.url
39. # Do not edit this file. You may delete it but then the IDE will
never regenerate such files for you.
nbproject/build-impl.xml.data.CRC32=f0f4ed42
nbproject/build-impl.xml.script.CRC32=54aa38f0
nbproject/[email protected]
gUIsInterface/nbproject/project.properties
annotation.processing.enabled=true
annotation.processing.enabled.in.editor=false
annotation.processing.processor.options=
annotation.processing.processors.list=
annotation.processing.run.all.processors=true
annotation.processing.source.output=${build.generated.sources.
dir}/ap-source-output
build.classes.dir=${build.dir}/classes
build.classes.excludes=**/*.java,**/*.form
# This directory is removed when the project is cleaned:
build.dir=build
build.generated.dir=${build.dir}/generated
build.generated.sources.dir=${build.dir}/generated-sources
# Only compile against the classpath explicitly listed here:
build.sysclasspath=ignore
build.test.classes.dir=${build.dir}/test/classes
build.test.results.dir=${build.dir}/test/results
# Uncomment to specify the preferred debugger connection
transport:
#debug.transport=dt_socket
debug.classpath=
${run.classpath}
debug.test.classpath=
${run.test.classpath}
# Files in build.classes.dir which should be excluded from
distribution jar
dist.archive.excludes=
# This directory is removed when the project is cleaned:
dist.dir=dist
41. ${javac.classpath}:
${build.classes.dir}
# Space-separated list of JVM arguments used when running the
project.
# You may also define separate properties like run-sys-
prop.name=value instead of -Dname=value.
# To set system properties for unit tests define test-sys-
prop.name=value:
run.jvmargs=
run.test.classpath=
${javac.test.classpath}:
${build.test.classes.dir}
source.encoding=UTF-8
src.dir=src
test.src.dir=test
gUIsInterface/nbproject/project.xml
org.netbeans.modules.java.j2seproject
gUIsInterface
gUIsInterface/src/guisinterface/GUIsInterface.javagUIsInterface
/src/guisinterface/GUIsInterface.java/*
* To change this license header, choose License Headers in Pro
42. ject Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package guisinterface;
import java.awt.*;
import javax.swing.*;
publicclassGUIsInterface{
publicstaticvoid main(String[] args){
// create a frame to hold the components
JFrame myJFrame =newJFrame();
// crearte a Borderlayput and assign it to the JFrame
myJFrame.setLayout(newBorderLayout());
// create a panel for the number buttons
// Grid with 5 by 3
JPanel buttonsPanel =newJPanel(newGridLayout(5,3));
// Declare an array of 10 JButtons for digits 0-9
JButton[] numberButton =newJButton[10];
// define and add buttons to the first row: 1 2 3
// define and add buttons for 1-3 to the panel
for(int i =1; i<=3; i++)
{
numberButton[i]=newJButton(""+i);
buttonsPanel.add(numberButton[i]);
}
// define and add buttons to the second row: 4 5 6
// define and add buttons for 4-6 to the panel
for(int i =4; i<=6; i++)
43. {
numberButton[i]=newJButton(""+i);
buttonsPanel.add(numberButton[i]);
}
// define and add buttons to the third row: 7 8 9
// define and add buttons for 7-9 to the panel
for(int i =7; i<=9; i++)
{
numberButton[i]=newJButton(""+i);
buttonsPanel.add(numberButton[i]);
}
// define and add buttons to the fourth row: * 0 #
// add the * button
JButton asteriskButton =newJButton("*");
buttonsPanel.add(asteriskButton);
asteriskButton.setFont(newFont("Arial",Font.BOLD,12));
// add the zero button
numberButton[0]=newJButton("0");
buttonsPanel.add(numberButton[0]);
// add the # button
JButton hashButton =newJButton("#");
buttonsPanel.add(hashButton);
hashButton.setFont(newFont("Arial",Font.BOLD,12));
// define and add buttons to the fifth row: Call Blank DELETE
// add the CALL button
JButton callButton =newJButton("CALL");
buttonsPanel.add(callButton);
// apply ont and change font size
callButton.setFont(newFont("Arial",Font.BOLD +Font.IT
ALIC,12));
// set the frontvcolor for call button
44. callButton.setForeground(Color.GREEN);
// add the ADD button
JButton addButton =newJButton("ADD");
buttonsPanel.add(addButton);
// apply font and change font size
addButton.setFont(newFont("Arial",Font.BOLD +Font.ITA
LIC,12));
// set the front color for call button
addButton.setForeground(Color.BLUE);
// add the END button
JButton endButton =newJButton("END");
buttonsPanel.add(endButton);
// apply font and change font size
endButton.setFont(newFont("Arial",Font.BOLD +Font.ITA
LIC,12));
// set the front color for call button
endButton.setForeground(Color.RED);
// add the main button panel to the JFrame
myJFrame.add(buttonsPanel,BorderLayout.CENTER);
// Create a right justified textField to display the result
JTextField jtResult =newJTextField("Enter Phone Number");
jtResult.setHorizontalAlignment(JTextField.RIGHT);
// add the result text field to the JFrame
myJFrame.add(jtResult,BorderLayout.NORTH);
// set the title, size, location and exit behavior for the frame
myJFrame.setTitle("Telephone Interface Demo 1");
myJFrame.setSize(240,320);
myJFrame.setLocation(240,320);
myJFrame.setDefaultCloseOperation(JFrame.EXIT_ON_C
LOSE);
45. // make the frame visible
myJFrame.setVisible(true);
}// end main()
}// end class