Sunday, April 5, 2009

Monday April 6 : additional stuff for our Swing Browser

Greetings JavaNoidz!



Today is going to be a simple two step process:



A) I will show you something pretty simple to do, that can be applied to ANY program you create here, that's pretty cool, AND its a response to a request that several of you had made.

Sometimes, you just gotta give the people what they want...



B) After that, you will have the rest of the class to further develop this mini browser we've been working on. Add to it something that we've worked with before, perhaps a menu or the ability to make use of saved files to extend its capabilities.



Remember, BEFORE the class ends, email me your completed program with its new powers, AND make a post on our Google group titled "what MY browser can do"





OK, so here's something easy and cool to do that will work with any program:



0) open the folder where your mini browser is stored



1) start up TextPad, and open your mini browser program



2) start up a new document, and type the following:



start javaw CreateTabbedPane



where "CreateTabbedPane" is the name of the class file you wish to run.
DO NOT add the ".class" extension




3) save this new file as StartBrowser.bat INSIDE THE SAME FOLDER AS YOUR PROGRAM. make SURE you add that ".bat" extension



4) This will make a batch file inside your folder that you can click on. Doing so will start your minibrowser program WITHOUT the annoying, telltale "command prompt" window --> that's why you use "javaw" to invoke your program



5) But wait there's more! It's not sold in any store! If you create a shortcut to this batch file, you should be able to drag that shortcut anywhere, even onto your Start button, which will make it part of the Start menu



6) But wait, there's STILL more ! If you right click on your new shortcut, and then click on "Properties", you can go to the "shortcut" tab, then click on the "Change Icon" button. This allows you to browse for an icon that looks cooler than the little gear thingy looking device you're using now



7) But wait: if you call RIGHT NOW, you can go to this address:

http://www.iconarchive.com/



and download any kind of icon file you want. Just download them to your folder, and then when you change the icon, just browse top your folder, and choose the icon you like :-)



Cheers,

Uncle Paulie

No comments:

Post a Comment