Results 1 to 20 of 22
- 03-04-2012, 04:12 PM #1
finish a running swing through cmd, help plz i need to clear the doubt for my project
hi,
When i start an applet, and then close it, the command prompt doesn't come to editing mode. Rather I have to press Ctrl+C to exit the executing mode.
Is there a syntax which we can insert into the class , so it exits automatically..
regards
- 03-04-2012, 07:57 PM #2
Re: finish a running swing through cmd, help plz i need to clear the doubt for my pro
Please explain what you mean by an applet? Applets are normally part of an HTML page and execute in a browser. There is no way to "close" an applet. It's part of what a browser displays on a page.When i start an applet, and then close it,
What are you executing, where is it being executed and on what OS?
What is command prompt editing mode?
- 03-06-2012, 07:06 PM #3
Re: finish a running swing through cmd, help plz i need to clear the doubt for my pro
- 03-06-2012, 07:09 PM #4
Re: finish a running swing through cmd, help plz i need to clear the doubt for my pro
What OS are you using?
What is "executing mode" and "editing mode"?
- 03-06-2012, 07:26 PM #5
Re: finish a running swing through cmd, help plz i need to clear the doubt for my pro
OS is windows XP..
executing mode, I mean, the cursor of CMD doesn't come to the next line, and we can't edit the line containing the cursor..
javaro.bmp
now see.. after clicking Ctrl+C, it comes to editing mode..
javaro1.bmp
- 03-06-2012, 07:30 PM #6
Re: finish a running swing through cmd, help plz i need to clear the doubt for my pro
How does the java program exit? Does it execute System.exit()?
Holding the ALT key with PrintScreen will get only the active window. Your images include too much junk.
- 03-06-2012, 07:33 PM #7
Re: finish a running swing through cmd, help plz i need to clear the doubt for my pro
- 03-06-2012, 07:36 PM #8
Re: finish a running swing through cmd, help plz i need to clear the doubt for my pro
I don't know what the code is doing.
Can you make a small simple program that compiles, executes and shows the problem?
Hiding the frame does NOT stop the program.close button on the JFrame ,while the java program is running
- 03-06-2012, 07:37 PM #9
Re: finish a running swing through cmd, help plz i need to clear the doubt for my pro
these are the codes..
Tester.java
Java Code:import java.awt.Container; import java.awt.Font; import java.awt.FontMetrics; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.geom.CubicCurve2D; import java.util.Vector; import javax.swing.JComponent; import javax.swing.JFrame; import javax.swing.JPanel; class Tester extends JFrame { public static void main(String[] args) { final JFrame f = new JFrame("My frame"); f.setSize(600, 400); f.setVisible(true); f.add(new JComponent(){ public void paintComponent(Graphics g) { g.drawLine(0,0,0,f.getHeight()); g.drawLine(0, f.getHeight()/2, f.getWidth(), f.getHeight()/2); Graphics2D g2 = (Graphics2D) g; g2.drawString("1", 10,25); g2.drawString("-1",10,f.getHeight()-50); g2.draw(new CubicCurve2D.Double( 10,100, 50, f.getHeight()/3,100,f.getHeight()/2,100,10)); } }); } }
- 03-06-2012, 07:40 PM #10
Re: finish a running swing through cmd, help plz i need to clear the doubt for my pro
I don't see anything in the program that would make it exit to the OS. Closing the JFrame does not stop the program.
Look at the API doc for the JFrame class for a method that will cause the program to exit when it is closed.
- 03-06-2012, 07:45 PM #11
- 03-06-2012, 07:51 PM #12
Re: finish a running swing through cmd, help plz i need to clear the doubt for my pro
Here is a link to the Api docs:
Java Platform SE 6
This is something you need to have. I look at it many times a day.
Find the class in the lower left and click the link for the doc to come into the main frame.
- 03-06-2012, 07:53 PM #13
- 03-06-2012, 07:54 PM #14
Re: finish a running swing through cmd, help plz i need to clear the doubt for my pro
Read the API doc for the System class to see how to code it.
- 03-06-2012, 07:56 PM #15
- 03-06-2012, 08:10 PM #16
- 03-07-2012, 08:17 AM #17
Re: finish a running swing through cmd, help plz i need to clear the doubt for my pro
Why do they call it rush hour when nothing moves? - Robin Williams
- 03-07-2012, 01:13 PM #18
Re: finish a running swing through cmd, help plz i need to clear the doubt for my pro
Post the code and the error message. No way to tell what is wrong without seeing the evidence.it shows errors
- 03-08-2012, 07:59 AM #19
- 03-08-2012, 08:01 AM #20
Similar Threads
-
help me to finish my project..
By syedabu in forum NetBeansReplies: 1Last Post: 07-19-2010, 09:13 PM -
convert please...to finish project
By syedabu in forum Web FrameworksReplies: 1Last Post: 02-24-2010, 07:17 PM -
please clear my doubt
By syedabu in forum Web FrameworksReplies: 1Last Post: 02-11-2010, 10:11 AM -
Please clear my doubt...............
By vinaytvijayan in forum Advanced JavaReplies: 0Last Post: 12-26-2007, 06:23 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks