GUI Front-ends

The DJ

Registered
Is there someone out there who can tell me how i can program a GUI frontend to CLI programs?
I have no idea where to start.
My only experience in programming is JAVA.

Please help out a starting developer.

DJ
 
Yeah, just use the Swing libraries in java. OS X has a java compiler built in "javac". There are heaps of sites with info about how to construct UI's with swing, in fact the Apple Developer's Connection has a downloadable .pdf file which walks you through greating a GUI-based java app in OS X. If you've downloaded the developer's resources from the ADC then this tutorial will show you how to create a GUI with those tools - http://developer.apple.com/techpubs/macosx/Cocoa/JavaTutorial/JavaTutorial.pdf

Other than that, you can use swing/AWT to create a GUI. There's a good AWT tute on the Sun website: http://developer.java.sun.com/developer/onlineTraining/awt/contents.html

Finally, Bruce Eckel has written a good java text book - and published the whole thing on the net: http://www.bruceeckel.com/TIJ2/index.html

If you use swing to create a GUI, by default it will use the "metal" look and feel. Add this line to your code to use the Aqua look and feel instead:

UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());

hope this helps, for more info on programming in java on the mac - have a look at http://www.macs.unisa.edu.au/~jakal/mac_java.htm
 
Does anyone know when Java is coming out for OS X ?
Is it going to be a GUI like the current one for MacOS,
or is it going to be in the CLI (like the sun one I use now)?
 
Uhmmm... I'm pretty sure Java2 is completely integrated into OSX as is. I'm not sure if I understand ur question, though... I can compile and run java code fine from terminal, and u can use project manager to make gui java apps. I hope I actually answered your question.

F-bacher
 
WOw...
So you mean that I can go into my terminal...
open up emacs... write my code...save it
then go back to the CLI type javac MyProgram.java
and it will do it ???
they I can run it by typig java mYprogram and it will run ??
No extra stuff needed ???
WOW! Need to test this out....

<< leaves really fast >>
 
some time ago..I had had bruce eckel's book in pdf for a good 3 months and didn't know it then went and got the book!

UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); seems to only work if you don't create any swing components before you call it.

If anyone has gotten the appletviewer to work..tell me how! I'm trying to be able to chat in Yahoo. I've extracted the applet tag burried in Yahoo's frames crap and have used this method in OS9 to avoid having to load it in the browser. Since OSX I haven't been able to do this.

I'm currently working on a chat server and client if anyone's interested in helping drop me a line at the_name_thief@yahoo.com and I'll send the code I've got so far or something...watch out, it's sloppy!
 
Hey IamBob,

I do not know if you ever succeeded with appletviewer. I wanted to do the same thing with gay.com chat. I yanked the applet tag and placed it into an html file. AV never liked any of the URLs I was feeding it locally. I had to place the html file on my website for AV to ven recognise the file. Work well for me, got a shell script to start it, but it is a pain that I cannot create a double-click to get to it.

HTH

Chris
 
Pity Swing doesn\'t define enough UI elements. They look and feel like emulators. I don\'t see a resolution unless Swing is rewritten. I don\'t think Sun ever considered Swing running on anything other than Solparis (sic) and Windows
 
Back to the original question... Can anyone give me any pointers how to program the display of output from a CLI program in a GUI window. Essentially what I would to do is be able to have a program like what you get when you run a command in Terminal. Any language, C, C++, Objective-C Java is OK.
 
Back
Top