NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

My imagePanel works fine in a simple swing application and not in a platform application?

 
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Platform Users
View previous topic :: View next topic  
Author Message
Anuradha G
Posted via mailing list.





PostPosted: Wed Aug 12, 2009 6:36 am    Post subject: My imagePanel works fine in a simple swing application and not in a platform application? Reply with quote

May be something to do with you using AWT
Back to top
Sarah kho
Posted via mailing list.





PostPosted: Wed Aug 12, 2009 9:15 am    Post subject: My imagePanel works fine in a simple swing application and not in a platform application? Reply with quote

Hi,

Thank you for reply.
Using JPanel instead of Panel
Back to top
Sarah kho
Posted via mailing list.





PostPosted: Wed Aug 12, 2009 10:42 am    Post subject: My imagePanel works fine in a simple swing application and not in a platform application? Reply with quote

Thank you for your help. those FAQ look to be very useful.


I can not use ImageUtilities because in fact I need to load images from file that my users select and also I need to load the image from database and then show it in my form.

Your solution works charming Very Happy I just add a CardLayout to my panel and now I can easily load and show the images Very Happy

Thanks, you are very helpful.

On Wed, Aug 12, 2009 at 2:07 PM, Geertjan Wielenga <address-removed ([email]address-removed[/email])> wrote:
Quote:

Quote:

Back to top
Sarah kho
Posted via mailing list.





PostPosted: Wed Aug 12, 2009 10:32 pm    Post subject: My imagePanel works fine in a simple swing application and not in a platform application? Reply with quote

Hello everyone.

Something very funny is happening to my application.

My code is like included snippet and I wrote it as one of my Jbutton actions. It loads the image but it does not show the image until I switch to another top component and then come back to this top component. (selecting another tab to view content of another top component. for example after I click on Accounts tab and then click back on Images tab it shows the picture). At first I though this is related to repainting the panel, but it was not the case because it does not resolve the problem.


Back to top
Sarah kho
Posted via mailing list.





PostPosted: Wed Aug 12, 2009 10:39 pm    Post subject: My imagePanel works fine in a simple swing application and not in a platform application? Reply with quote

I find the solution, or at least one of possible solutions. I do not know whether it is optimized or not but:


When I add
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Platform Users 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
You can attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo