ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
i need to create a gui for an application using java ... am a newbie to java ... and have no idea abt gui. i have done a little bit of gui development in VC++ and tht tooo very very basic ... but i do understand the concept of listeners and event handlers ...
please could neone of u, direct me to a good place to learn gui development in java .... or are there ne IDE's tht could help me developing the gui
i need to create a gui for an application using java ... am a newbie to java ... and have no idea abt gui. i have done a little bit of gui development in VC++ and tht tooo very very basic ... but i do understand the concept of listeners and event handlers ...
please could neone of u, direct me to a good place to learn gui development in java .... or are there ne IDE's tht could help me developing the gui
thanks a lot in advance
Forget java.
use Python, PyGTK and Glade . It rocks!
i am creating an application for someone...all of my other processing is being done in java .... so i would like to have my front end too in java .... or ... is it possible to use my java code with python. can i create executables with python as the front end and java as a back end .... ????
i was planning to use java for gui and then make the whole project as a .jar and distribute it
You can do the gui stuff by hand, but if you want something similar to VS/VB where you can "draw" the gui's and buttons, then put code on it, Java Netbeans is going to be your best shot:
Originally posted by Megaman X it really, really depends of what his project is about . Java is great, I found it to be a bit slow, but very versatile...
my project is to develope an application with the following aim
input - microsoft word documents.
the documents have certain headings and data ... i need the information under certain headings only. i am using antiword to get the text inside the .doc files .... doing the processing and creating an xml file. now this xml file is to be searched and depending upon the search query some records qill be displayed.
i need a module tht will help add information to the xml file ... by specifying the path to the documents.
another module to actually query the xml file and display the results (and print them)
3rd module which would allow the user to enter the information right in the appliction .. so it directly gets stored as an xml ... and helps him to avoid using MICROSOFT OFFICE
how should i go abt creating the GUI
also i am looking at netbeans and really seems to be a great tool
can i create executables with python as the front end and java as a back end .... ????
You can, through Jython. It's a pure Java implementation of Python. You code using Python syntax, yet have access to both libraries.
Though, unless you are willing to learn a new language, i'd continue with implementing the GUI in Java (Swing ain't the simplest of GUI libraries, but it's not that hard).
ok I have a fair amount of experience in java GUI programming. Swing is very useful. Basically in your constructor just create all the necessary objects (JButtons, the JFrame,the JPanel, etc...) and then in your main method (say your JFrame object is called frame) just calll:
frame.pack();
frame.show();
and that will display your window and all the objects on the screen. Also make use you do
panel.add(Button1)
panel .add(Button2)
or whatever objects you have that need to be displayed (assuming your JPanel object is called panel).
Sorry if this confuses more than it helps, but if you have to there are entire books devoted to swing and it's functionality. It's very very useful but as was stated earlier....you're application won't be very fast.
If you are just making a GUI Frontend for taking in strings for example, try looking at a simple JOptionPane....it's much simpler than what I described above, but it isn't nearly as powerful.
If you have experience of event driven programming then java will be a breeze in gui programming. Only pain in the ass is everything on the screen is relative (unless you want to take control of everything). Take a look at Sun's java tutorial trails if you don't have any other literature on hand.
thanks for ur inputs ... was away so did not read ne messages for the past 3-4 days ...
i have started developing the gui in netbeans ... am slowly and steadily learning Swing. just wanted to pose anothe question
how slow will my application be ??? wht can i use to make it faster ... and how powerful is Jython .... am ready to learn a new language .... think thts wht internships are for
Speed is relative. It all depends on your needs. You hear people bash Java for it's lack of performance, but most of the time it's not that big of a deal. You gain by developing the application faster (compared to more native implementations).
It obviously also depends on how complicated the gui is and many other aspects..
Having said that, Java applications do tend to be slower than native applications, but if you take care during your design, you can elevate that. Speed is the price you pay for platform independences. Most of the time your app will run on any OS that has the jvm.
The problem really with Swing (and Java) is that it tries to be perfect. The way they [sun] designed it is amazing at times from a design perspective, but that obviously doesn't mean it's easy or handy to program with. Sometimes you need to go through a lot of dumb steps to do a little thing (think java's IO).
Anyway, do your app in plain Swing, chances are the performance will be just fine. If you want to explore, then check out SWT (what Eclipse is built on). It tends to be faster but not as platform independent (i believe).
As far as Jython is conserned. It's another layer over Java. So while it will make your development easier and faster (think of it as a scripting engine for Java, like BeanShell, etc), it will definatly NOT make your apps faster (it will make them slower unless you compile the Jython code straight to java's class files - jythonc).
Good luck
Last edited by coolman0stress; 06-30-2004 at 11:27 AM.
i am not very clear whn should i add a JDesktopPane to my class and when should i add a JPanel. am really not able to understand the complete concept of developing the GUI
Don't forget about layout managers. To use one, you would call setLayout() on a JFrame or JPanel. Different layout managers arrange your components in different ways. You can nest JPanels to make complex arrangements.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.