Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 07-07-2004, 09:37 AM   #1
LQ Newbie
Registered: Jul 2004
Posts: 26

Rep: Reputation: 15
how to program java gui application

I made a java application which has GUI packages.When it was executed
it show so many exception and said that not support xserver.Is it possible
to execute GUI java main application. Please suggest me
Old 07-07-2004, 10:39 PM   #2
Registered: Dec 2002
Location: Brisbane, Australia
Distribution: RedHat (RHEL, FC, CentOS), openSuSE, Mac OS X
Posts: 653

Rep: Reputation: 32
not sure what you are doing but, if you you do a standard little program ..

import java.awt.*;
import javax.swing.*;

public class test extends JFrame
public static void main(String args[])

you SHOULD be getting a JFrame (window) in the center of your screen, of size 100 by 100 pixel (Plus decorations ... ie the frame itself).

I didn't test that but it should compile and run (though i could be wrong) if you save it as

Of course it's only a start and you need to add buttons and all the other fun things ...

IF you want a definitely working example of how to do it ... check out my website (bottom link in my signature - and grab the latest pre release, which generates a tabbed pane with multiple options via checkboxes, comboboxes, spinners, as well as having a JMenu on it's main window and a popupmenu

(to see the options screen click Edit>Preferences)

Good luck (else might be worthwhile to post your code, and the errors ...)

OH one other thing, if you are adding to a frame, make sure you don't frame.add() rather do frame.getContentPane().add()

good luck

Last edited by chakkerz; 07-07-2004 at 10:42 PM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
how can i install rpm in FC using some gui application amolgupta Linux - Software 3 07-24-2005 11:55 PM
Stop java program(threaded program..should end cleanly) rmanocha Programming 4 11-09-2004 10:36 AM
GUI application design toolkits. which one? name_in_use450 Programming 3 08-25-2004 08:56 PM
edonkey java gui not finding java Sephiroth Linux - Software 0 03-13-2004 09:14 PM
1. shell script "find and replace" on text 2. java GUI application randomx Programming 4 03-05-2004 02:01 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:47 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration