AppletTalk.com Forum Index AppletTalk.com
Java discussions newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Problem with setUndecorated() method in JFrame

 
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java GUI Toolkits
View previous topic :: View next topic  
Author Message
And
Guest





PostPosted: Thu Aug 24, 2006 2:19 pm    Post subject: Problem with setUndecorated() method in JFrame Reply with quote



Hi,
I have a problem using the method in subject in my Java app. There's a
JFrame with backgound image (JLabel tip...) and several JDIC WebBrowser
(java.awt.Canvas) disposed on it at runtime, following position and
dimension rules on a xml file. This app works fine in fullscreen mode
using the method setFullScreenWindow(this) of GraphicsDevice, but it
does only if the frame is decorated: using setUndecorated(true) on my
JFrame cause bad rendering of components on the stage. It seems that
the background image overlap the browsers...but it have a strange a
different behaviour any time. All works well if the frame is
decorated... :-/
If you would like to help me I can provide any detail of my source !
Thank you very much, bye!!!!
Back to top
Knute Johnson
Guest





PostPosted: Thu Aug 24, 2006 7:56 pm    Post subject: Re: Problem with setUndecorated() method in JFrame Reply with quote



And wrote:
Quote:
Hi,
I have a problem using the method in subject in my Java app. There's a
JFrame with backgound image (JLabel tip...) and several JDIC WebBrowser
(java.awt.Canvas) disposed on it at runtime, following position and
dimension rules on a xml file. This app works fine in fullscreen mode
using the method setFullScreenWindow(this) of GraphicsDevice, but it
does only if the frame is decorated: using setUndecorated(true) on my
JFrame cause bad rendering of components on the stage. It seems that
the background image overlap the browsers...but it have a strange a
different behaviour any time. All works well if the frame is
decorated... :-/
If you would like to help me I can provide any detail of my source !
Thank you very much, bye!!!!


You may be having problems with the lightweight/heavyweight components.
Try changing your JFrame to a Frame and see if that helps. If not
please post a simple working example of your problem.

--

Knute Johnson
email s/nospam/knute/
Back to top
And
Guest





PostPosted: Wed Aug 30, 2006 9:37 pm    Post subject: Re: Problem with setUndecorated() method in JFrame Reply with quote



Knute Johnson ha scritto:

Quote:
You may be having problems with the lightweight/heavyweight components.
Try changing your JFrame to a Frame and see if that helps. If not
please post a simple working example of your problem.

Thank you for your answer!
I've just posted my specific problem on JDIC Forum...i'm not sure my
real problem is the use of setUndecorated method, but as you suggested
me, the mixed use of heavy and light components. (I read this
interesting arcticle:
http://java.sun.com/products/jfc/tsc/articles/mixing/).
I would like to know if this strange behaviour is due to my wrong
source...i'm rather new in "gui world"...here you can find a scrap of
code:

http://forums.java.net/jive/thread.jspa?threadID=17931&tstart=0

Thank you very much!! Bye!!!
Back to top
Knute Johnson
Guest





PostPosted: Thu Aug 31, 2006 3:59 am    Post subject: Re: Problem with setUndecorated() method in JFrame Reply with quote

And wrote:
Quote:
Knute Johnson ha scritto:

You may be having problems with the lightweight/heavyweight components.
Try changing your JFrame to a Frame and see if that helps. If not
please post a simple working example of your problem.

Thank you for your answer!
I've just posted my specific problem on JDIC Forum...i'm not sure my
real problem is the use of setUndecorated method, but as you suggested
me, the mixed use of heavy and light components. (I read this
interesting arcticle:
http://java.sun.com/products/jfc/tsc/articles/mixing/).
I would like to know if this strange behaviour is due to my wrong
source...i'm rather new in "gui world"...here you can find a scrap of
code:

http://forums.java.net/jive/thread.jspa?threadID=17931&tstart=0

Thank you very much!! Bye!!!


You are going to have to post a compilable example that demonstrates
your problem. I can't tell from the partial code above where your
problem is. Also you code is very hard to read without some indentation.

--

Knute Johnson
email s/nospam/knute/
Back to top
And
Guest





PostPosted: Thu Aug 31, 2006 12:44 pm    Post subject: Re: Problem with setUndecorated() method in JFrame Reply with quote

Knute Johnson ha scritto:

Quote:
You are going to have to post a compilable example that demonstrates
your problem. I can't tell from the partial code above where your
problem is.

Ok...i missed the import statements...but there's a complete class,
with main method: what should i have to add?

Quote:
Also you code is very hard to read without some indentation.

I'm sorry, but i though that every IDE should have "format" and
"organize import" functions...and it probably doesn't compile due to
the dipendency on JDIC libraries...
Back to top
Ian Wilson
Guest





PostPosted: Thu Aug 31, 2006 2:58 pm    Post subject: Re: Problem with setUndecorated() method in JFrame Reply with quote

And wrote:
Quote:
Knute Johnson ha scritto:


You are going to have to post a compilable example that
demonstrates your problem. I can't tell from the partial code
above where your problem is.


Ok...i missed the import statements...but there's a complete class,
with main method: what should i have to add?

I'd make it so that readers can cut text from your posting, save it to a
file and compile it with javac to make a working program that they can
run without them having to add anything. Have you heard of the idea of a
"Small Self-Contained Compilable Example" (SSCCE)?

Quote:
Also you code is very hard to read without some indentation.


I'm sorry, but i though that every IDE should have "format" and
"organize import" functions...

OK, but firstly you are cutting yourself off from help by people who can
see where you are going wrong by simply reading the post here without
going to the effort of pasting it into an IDE and reformatting it.

Secondly, when posting a question, I think its better I spend 10 mins
formatting my example than expect 100 people spend 10 mins each
formatting my example (total 16.5 hours of their time wasted).

I find that the more work I ask make people to do (for free) the less
likely they are to be motivated to help. I'd spend the time to make it
easier for them to help me.


Quote:
and it probably doesn't compile due to
the dipendency on JDIC libraries...

I'd spend a few minutes creating an example that shows the problem
without using JDIC libraries.
Back to top
And
Guest





PostPosted: Thu Aug 31, 2006 4:01 pm    Post subject: Re: Problem with setUndecorated() method in JFrame Reply with quote

Ian Wilson ha scritto:

Quote:
I'd make it so that readers can cut text from your posting, save it to a
file and compile it with javac to make a working program that they can
run without them having to add anything. Have you heard of the idea of a
"Small Self-Contained Compilable Example" (SSCCE)?

I agree with you.

Quote:
OK, but firstly you are cutting yourself off from help by people who can
see where you are going wrong by simply reading the post here without
going to the effort of pasting it into an IDE and reformatting it.

Secondly, when posting a question, I think its better I spend 10 mins
formatting my example than expect 100 people spend 10 mins each
formatting my example (total 16.5 hours of their time wasted).

No doubt about this, but i'm rather astonished of the text editor of
java.net.Forum: i usually have a daily activity on Usenet, i always try
to pay attention to quote and to provide the best way to read my
posts...i have to admit i was victim of hurry! :-/ :-)

Quote:
I find that the more work I ask make people to do (for free) the less
likely they are to be motivated to help. I'd spend the time to make it
easier for them to help me.

I think it too, see above...

Quote:
I'd spend a few minutes creating an example that shows the problem
without using JDIC libraries.

Good...so can you suggest me any tips about building guis and avoid
errors like that one?
Thank you for the time you spent on this post, bye!
Back to top
Display posts from previous:   
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java GUI Toolkits All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.