• 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

setLookAndFeel UI issue

 
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());

Hello Guys, i notice if I don't do this.. my UI will jumble up !!!

Does it mean, my application UI might not look the same on a different platform?
 
Ranch Hand
Posts: 590
Eclipse IDE Chrome Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ixus See wrote:UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());

Hello Guys, i notice if I don't do this.. my UI will jumble up !!!


It is not clear what you mean by "jumble up". Can you give us more of a complete description of the problem you are experiencing?

Ixus See wrote:Does it mean, my application UI might not look the same on a different platform?


As a team lead I am sure you would recommend that your team members actually test their work, rather than relying on someone telling them it should work ?

Would your team test on different platforms? Maybe you have access to different platforms in work, so you could test on them? Or you could install a different platform on your own machine and test?

 
Ixus See
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Sean Keane wrote:

Ixus See wrote:UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());

Hello Guys, i notice if I don't do this.. my UI will jumble up !!!


It is not clear what you mean by "jumble up". Can you give us more of a complete description of the problem you are experiencing?

Ixus See wrote:Does it mean, my application UI might not look the same on a different platform?


As a team lead I am sure you would recommend that your team members actually test their work, rather than relying on someone telling them it should work ?

Would your team test on different platforms? Maybe you have access to different platforms in work, so you could test on them? Or you could install a different platform on your own machine and test?



my UI will jumble up !!! -> It means the Text field and buttons all extend, so they jumble up.


May I ask if you are working software engineer? IF you are I doubt the size of your project pass 1million or you are in the position to know the contract details. Anyway the platform would be stated in the contract, this is to safe guard the company, so all our developments are perform on the stipulated platform
 
Sean Keane
Ranch Hand
Posts: 590
Eclipse IDE Chrome Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ixus See wrote:Anyway the platform would be stated in the contract, this is to safe guard the company, so all my developers develop on the same platform.



If your company supports other platforms, then I am sure that your company will have other platforms that you can easily get access to and test on. I would suggest this as a first option.

Alternatively you could use something like cygwin. Or you could install a different platform on your machine - you could use a virtual machine on your own machine or you could create a separate partition to install the platform.

If you follow either of my recommendations above you should be able to answer your question "Does it mean, my application UI might not look the same on a different platform?". Would you not agree?

Alternatively, you could simply state in your options that you have no idea whether your application works on another platform because you did not test it.
 
Ixus See
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hmmm I think stating that it will only work on my development platform would be a safer bet, that would reduce the complication.

Yes I know Java suppose to code once work everywhere..

I am going to set .setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel"); just to be safe and do a check before executing the program.

 
Ranch Hand
Posts: 54
Eclipse IDE Spring Linux
  • Likes 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm sorry but I think you need to stop talking down to those that ultimately have been trying to help you. If it was my choice I would rather have working along side me, the person with less experience but is motivated to research, test and work things out themselves rather than just talking the talk.
 
Bartender
Posts: 5167
11
Netbeans IDE Opera Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ixus See wrote:UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());

Hello Guys, i notice if I don't do this.. my UI will jumble up !!!

Does it mean, my application UI might not look the same on a different platform?



No, it means you haven't learned to use layout managers correctly.
http://download.oracle.com/javase/tutorial/uiswing/layout/index.html

And as this doesn't appear to have anything to do with Developer Certification (SCJD/OCMJD), I'm moving it to the GUIs forum.
 
Ixus See
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Sean Keane wrote:

Ixus See wrote:Anyway the platform would be stated in the contract, this is to safe guard the company, so all my developers develop on the same platform.



If your company supports other platforms, then I am sure that your company will have other platforms that you can easily get access to and test on. I would suggest this as a first option.

Alternatively you could use something like cygwin. Or you could install a different platform on your machine - you could use a virtual machine on your own machine or you could create a separate partition to install the platform.

If you follow either of my recommendations above you should be able to answer your question "Does it mean, my application UI might not look the same on a different platform?". Would you not agree?

Alternatively, you could simply state in your options that you have no idea whether your application works on another platform because you did not test it.



do you think it is necessary to test the application in different platform? Because the solution you provide requires a lot of effort, is easy to provide solutions to many problems but solutions shouldbe as simple and require least effort. I think IF my engineer come and ask me this question(assuming I have enough knowledge to answer)

my answer would be, well the contract stipulates that it should work on windows platform so as long if it works, you should be fine...

but if you wish to test you can run it on different platform but is not necessary for this project. KUDOS for considering this, but lets not get ahead of us.

well apparently the "contract" aka assignment here doesn't state if the software needs to run across different platform and moreover they ask you to state the host platform you work on. I assume they are going to give you some benefit of doubt if your assignment cant work on GTK+, HP UX or IBM UNIX.

more over UI manager allows you to get the LOOK AND FEEL so as long the platform has the particular API installed, the UI should run flawlessly, that is the reason why I change from setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); to .setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");

I'm sure you are a talented and resourceful engineer, but you need to evaluate the solution you provide to others. For example in this case you ask me to test my application in different platform, which is absolutely unnecessary and time consuming and worst you make feel lousy when you question my team lead role.
 
Ixus See
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Darryl Burke wrote:

Ixus See wrote:UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());

Hello Guys, i notice if I don't do this.. my UI will jumble up !!!

Does it mean, my application UI might not look the same on a different platform?



No, it means you haven't learned to use layout managers correctly.
http://download.oracle.com/javase/tutorial/uiswing/layout/index.html

And as this doesn't appear to have anything to do with Developer Certification (SCJD/OCMJD), I'm moving it to the GUIs forum.



hmmm I doubt there is anything to do with Layout Manager, because it works if I set windows look and feel UI Manager.

it has something to do with UIManager rather than Layout Manager.

anyway thanks ;)
 
Darryl Burke
Bartender
Posts: 5167
11
Netbeans IDE Opera Java
  • Likes 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ixus See wrote:more over UI manager allows you to get the LOOK AND FEEL so as long the platform has the particular API installed, the UI should run flawlessly, that is the reason why I change from setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); to .setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");


Which will set exactly the same L&F on Windows, and fail with an exception on any other platform. So what have you gained?
 
Darryl Burke
Bartender
Posts: 5167
11
Netbeans IDE Opera Java
  • Likes 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ixus See wrote:hmmm I doubt there is anything to do with Layout Manager, because it works if I set windows look and feel UI Manager.


That's exactly why it has everything to do with the improper use (or lack of) of a layout manager.

Ixus See wrote:it has something to do with UIManager rather than Layout Manager.


Nope. It appears you don't correctly understand their roles. did you go through the tutorial I linked?

 
Sean Keane
Ranch Hand
Posts: 590
Eclipse IDE Chrome Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ixus See wrote:For example in this case you ask me to test my application in different platform, which is absolutely unnecessary and time consuming and worst you make feel lousy when you question my team lead role.



Correct me if I am wrong, but your original question was "Does it mean, my application UI might not look the same on a different platform?"? I think most people would agree that if you want to know whether your UI will look different on a different platform the solution is simple, go test it.

If you aren't worried about how it will look on other platforms, then you shouldn't have asked that question. Simple logic my friend.
 
Sheriff
Posts: 11604
178
Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
  • Likes 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Darryl Burke wrote:did you go through the tutorial I linked?


I would be very amazed if he would. His original question is part of the SCJD certification, but he tries to pursue this certification with no effort at all (or the least possible). So reading a tutorial, using google to do some research,... is all to much effort for our friend and he doesn't do it at all. He just wants an answer on his question, preferrably with the needed code provided, so he just has to do some copying and pasting. He is pursuing a developer certification but lacks every skill a developer should have, but he has for everything some fancy excuse.

So I would suggest: don't spend your valuable time answering his questions, because he does not show any effort at all and only appreciates instant answers (the ones he can just copy/paste). When you give him an answer he has to put some effort in (some thinking of his own, reading tutorial, using google,...) he complains about the assistance he gets instead of being grateful to get some assistance and start working with the information provided.
reply
    Bookmark Topic Watch Topic
  • New Topic