Swing and Unix


 
Thread Tools Search this Thread
Top Forums Programming Swing and Unix
# 1  
Old 10-24-2008
Question Swing and Unix

We use a Unix terminal emulator like xterm at work to connect to our Unix machines from our PCs. I need to set up an interactive form that can display form elements (like toggle, radio, buttons, drop-down lists, etc). I thought it'd be a simple thing to use Java's Swing classes to help with this, but when I try to create a JFrame from Unix, it disrupts all open xterminals (temporarily removing borders, menus, title bars, etc). Has anyone had a similar problem? And if so, how did you fix it? What other solutions might I consider? Unfortunately, I haven't discovered a native UNIX utility installed on our machines that can handle cursor placement in the terminal window.
# 2  
Old 10-30-2008
It sounds like the Swing GUI is for some reason crashing your window manager (which one are you using, do you know), which is then automatically restarting. You might want to check your X log files for any error messages or clues about why it's falling over, and also try perhaps using a different window manager temporarily to see if it works around the problem.
# 3  
Old 11-03-2008
We use XManager. The problem is, I can't ask everyone in my company to start using a new terminal program. I either have to solve the problem by setting something with a shell script before creating the swing components, or something else. I'm running out of ideas. I have no idea where or if X logs are being created.
# 4  
Old 11-03-2008
I realise that, I'm just suggesting this as a temporary troubleshooting step to narrow down the source of your problem. I'm not familiar with XManager... what operating system and desktop are you using (CDE? Gnome?).
# 5  
Old 11-03-2008
Perhaps my newbie status is showing through a bit much and I'm not explaining things correctly. The end user of my application is on a Windows XP pc. They connect to our UNIX machines via XManager, which runs X applications. We use xterm (/usr/bin/X11/xterm).

I am wanting to display a form to the user that will allow them to select certain files and then do some validation. The files are on the UNIX file-system, which they are accessing via xterm. When I try to start a java program that uses Swing, as soon as it tries to display the JFrame (I've also tried with AWT Frames), all open XManager xterm windows are disabled and lose borders, buttons, etc.

I've researched and found bits and pieces of people grumbling about the same thing, but no solution. It may be that Swing/AWT is just not compatible with our interface with UNIX. But I don't know what else to try.
# 6  
Old 11-03-2008
Have you tried with any of the the SwingSet2 sample applications? They should be the lowest-common-denominator of Java/Swing applications to test with I'd guess.

From what you say it sounds like XManager running on the Win32 end is the window manager in question, and probably most likely at fault. I'd investigate whether it has a logging mechanism or any way to turn such a facility on if it is off by default.

Do you have any other X server software for Win32 you can test with? Hummingbird Exceed, X-Win32, Cygwin/X and TEDeXtend are some that I can think of...
# 7  
Old 11-03-2008
Also, can you launch other vanilla X applications fine from the xterm, such as xclock?
Login or Register to Ask a Question

Previous Thread | Next Thread

3 More Discussions You Might Find Interesting

1. Programming

Java Swing

Hi All, I am new to java swing. I want to develop a electronic schematic editor in java swing. An schematic editor is one where you can put all electronic components and join them to make a circuit. Its like drawing your circuit on paper. Here the paper would be like graph paper or grid which... (1 Reply)
Discussion started by: diehard
1 Replies

2. Programming

Swing GUI hangs on Mac OS

Hi All, I have created a simple swing application, that has 3 textfields, and 2 buttons. When I try to run the code, following error comes and GUI hangs. 2011-01-21 22:32:39.905 java : Enabled 2011-01-21 22:32:39.908 java : Setting timeout for SWT to 0.100000 2011-01-21 22:32:40.589 java ***... (0 Replies)
Discussion started by: akash.mahakode
0 Replies

3. Programming

swing not getting initialized when the DISPLAY is not set

I have a batch programme which will load the Spreadsheet into database.. When the DISPLAY is set and X11 window server is running, there is no issue in reading the spreadsheet and loading into database without lauching UI. But if the display is not set, then there is an issue... Any ideas... (3 Replies)
Discussion started by: shafi2all
3 Replies
Login or Register to Ask a Question