• (3 Pages)
  • +
  • 1
  • 2
  • 3

Creating a basic Notepad Application Rate Topic: ***** 1 Votes

#31 arashzz  Icon User is offline

  • New D.I.C Head

Reputation: 5
  • View blog
  • Posts: 39
  • Joined: 28-September 09

Posted 14 December 2010 - 01:44 PM

View Postjumptrooper, on 22 August 2010 - 06:32 PM, said:

I went through and coded this tutorial and like I said before, you did a great job. I did, however, find something interesting and I'm wondering if you might be able to explain it for me.
Whenever I exited the program using the "close" menu item, the window would disappear but the process would continue to run. I kept having to manually terminate the program from the command line. I modified the relevant portion of the event handler to say:
// if the source of the event was our "close" option
		if(e.getSource() == this.close){
			this.dispose();  // dispose all resources and close the application
			System.exit(0);
		}

And this fixed everything (I can actually get rid of the this.dispose(); line altogether and it works fine too). I did this on an Ubuntu linux computer - could that have anything to do with it? Is "this.dispose();" supposed to terminate the program or just visually remove the window and all its resources?

Did anyone else run into this?


The close menu item worked perfectly for me and terminated the process as it should, not sure why it didn't work for you.
Was This Post Helpful? 0
  • +
  • -

#32 vikramsehgal  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 29-September 11

Posted 29 September 2011 - 09:49 AM

Hey Guys
I did not understand those codes properly so can please anyone explain me. :plain: :blush: :blush:
Was This Post Helpful? 0
  • +
  • -

#33 RepeatingYesterday  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 12-October 11

Posted 12 October 2011 - 07:48 PM

Thank you for posting this great tutorial. We are going over reading/writing to Files in my Object Oriented Programming class, and this really helps me put what is going on together.
Was This Post Helpful? 0
  • +
  • -

#34 tiarasalmi  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 16
  • Joined: 06-February 11

Posted 23 March 2012 - 01:52 AM

how to create a program codings that can write into Microsoft Word....using Java
Was This Post Helpful? 0
  • +
  • -

#35 dougyno1  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 63
  • Joined: 06-May 11

Posted 29 March 2012 - 12:59 PM

Great tutorial :),

nice commenting through the syntax, explained everything, great for my refreshment on java as well.
Was This Post Helpful? 0
  • +
  • -

  • (3 Pages)
  • +
  • 1
  • 2
  • 3