• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Please run the program in pure Unix Box

 
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, everyone!

Now I design a program, the following code is the GUI section. Because I need precise size and location for every component, I have to use the setBounds method to achieve this. But I heard that using such method which depends on the absolute location may cause some of the components changing their sizes and positions when the program runs in different operation systems. I tested it in Windows 2000 professional, it looks nice. But I don't have pure Unix Box on my machine, I beg you for help. please run it in the pure Unix system and upload the look and feel result in the reply post.

By the way, how can I implement the same look and feel appearance using Layout settings instead of setBounds method?



Thanks in advance!
Regards, Ailsa Cape
[ September 18, 2005: Message edited by: Ailsa Cape ]
 
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Ailsa Cape:
But I don't have pure Unix Box on my machine,



Knoppix is full-featured Linux distribution that runs from a bootable CD. Nothing to install, just put the CD in your drive and reboot.


By the way, how can I implement the same look and feel appearance using Layout settings instead of setBounds method?



Have a look at the Java Tutorial chapter on Laying out Components
 
Ailsa Cape
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, Joe

Thank you for your answers.
Now I understand Knoppix is a really powerful utilities. However I can't find one in my city. Would you like to run the above code(just copy and paste it) on the Knoppix for me?

Thanks in advance!
Regards, Ailsa Cape
[ September 19, 2005: Message edited by: Ailsa Cape ]
 
Ranch Hand
Posts: 165
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Actually, the link he gave you on KNOPPIX is a OS that you can run on your PC that you can use to test your app. It is CD based so you don't have to worry about wiping your windows OS.

You can download the KNOPPIX OS from that link.
 
Ailsa Cape
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,Stephen

Thank you! Although it will take me almost 17 hours to download the sofeware, I'll try that.

Regards, Ailsa Cape
 
Stephen Boston
Ranch Hand
Posts: 165
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Whoops! I forget sometimes that not everyone is on broadband.

I wanted a copy of the OS anyway. Once I get it to a DVD I'll fire it up and try your code.

Steve
 
Stephen Boston
Ranch Hand
Posts: 165
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ailsa.

OK, just to give you an update. I have the OS on a DVD now and booted it last night. It was fairly late when I did this so I didn't get a chance to test your code. I will do that tonight and let you know how it looks.

Steve
 
Ailsa Cape
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, Stephen

Thank you a million!

I am sorry for coming late since I have been busy to prepare the SCJD and SCWCD exam recently. I am eagar to know the result in the Linux System. I beg you for uploading it.

Thanks in advance!

Regards, Ailsa Cape
 
Stephen Boston
Ranch Hand
Posts: 165
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well I ran into a slight snag. I had to do some web work for a club I belong to so I had to back burner our little project.

I will attend to that tonight and give you the results ASAP.

Steve
 
Joe Ess
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here is your app running on Gentoo Linux, JDK 1.4.2_09, xorg X11 and kde. Your results will vary depending on your platform's particular setup.
I had to make one change to get it to work under JDK 1.4.2. One cannot use JFrame.add(). It is necessary to get the content pane of a JFrame and add GUI components to it:
 
Stephen Boston
Ranch Hand
Posts: 165
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Nice! I like that look and feel it has.
 
Ailsa Cape
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, Joe

I really appreciate your great help.
I find the appearance of this program in Gentoo Linux is basically the same as that in Windows 2000.
I am sorry for not mentioning the JDK version when I tested it in Windows 2000. I used the JDK 1.5.0_02 to compile this java file and I got the success message. I don't realize the JDK 1.4.2_09 will report that error. Thank you again for correcting it and testing it.

Hi, Stephen

Thank you again. It is very kind of you to help me when you are busy working for a club.

Best Regards, Ailsa Cape
 
Stephen Boston
Ranch Hand
Posts: 165
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Ailsa Cape:
Hi, Joe

I really appreciate your great help.
I find the appearance of this program in Gentoo Linux is basically the same as that in Windows 2000.
I am sorry for not mentioning the JDK version when I tested it in Windows 2000. I used the JDK 1.5.0_02 to compile this java file and I got the success message. I don't realize the JDK 1.4.2_09 will report that error. Thank you again for correcting it and testing it.

Hi, Stephen

Thank you again. It is very kind of you to help me when you are busy working for a club.

Best Regards, Ailsa Cape




No problem! We are getting close to Nationals and everyone has updates they want up on the web page. And of cousre it is not properly formatted for the page. (And then they change their minds. ugh! )

I did manage to get to your program despite all that. I don't have a screen shot for you, I was having trouble getting the network up for some reason. (a task for another day), but after the making the changes Joe suggested it compiled just fine and displayed very close to what Joe had. Everything lined up just like the version I ran in windows. Looks like a winner to me.
 
reply
    Bookmark Topic Watch Topic
  • New Topic