JFrame displays without its components or settings (please help)
On clicking a button in an app, due to computational time required, I need to have a message popup that says 'Please Wait', which vanishes on end of needed computation. For this, I have a small working class MsgDiag that simply displays a non-modal titled JFrame showing a message string in a JLabel and an 'ok' in a JButton. This works fine when invoked directly via its own main method as a standalone, but when called from that other application(also a extended JFrame) via button click, it just brings up a blank grey untitled JFrame without the components (JLabel and JButton) or the background color! It does stay up for the required duration and vanishes on disposing its JFrame as expected but why blank w/o components or settings ?
I also find that though the JFrame component comes up blank grey, if during the computation portion in calling application, if any info/errors are popped up via direct call to a JOptionPane().showMessageDialog(JFrame(),msgString, titleString, msgType), then along with that modal popup (from JOptionPane), the grey JFrame gets correctly drawn with components and background !
Does this provide any hints ? Since MsgDiag works ok by itself I am puzzled.
I also tried putting basic code from MsgDiag (creating JFrame, adding its components, setting it visible etc) into the other app directly but same grey blank frame results. Had there been a non-modal JOptionPane I could have tried using it. I use JRE 1.4.2
Per your suggestion, I tried putting computational part in a different thread. Also tried putting the thread priority for computational thread to lowest.
In other approach, also tried putting the GUI popup (frame2) in a separate thread with highest priority while lowest priority computational thread executed. But neither approach worked. Still shows frame2 as blank w/o background or components inside while low priority computational thread finished, when frame2 gets disposed as instructed.
In 1st approach, also tried adding validate() following setSize() as some other posts have suggested but that did not change anything. Any other pointers ?
Similar Messages
-
im having trouble connecting my macbookpro to the tv. im using a mini display port to hdmi adapter, when i switch tv/video to hdmi on the tv nothing pops up, and i dont have the arrangement tap on the display settings, please help!
I've found that the order of operations, so-to-speak, can be important when hooking up mini display port to HDMI. I have the most success with the following operations in this order:
1) Plug HDMI cable into mini displayport adapter (the cable should not be plugged into either the TV or the computer at this point)
2) Plug the mini displayport end of your new super-cable to the computer.
3) Plug the HDMI end into your TV.
4) Switch inputs on your TV to the proper input.
5) If still nothing on the TV, try a different HDMI port on your TV.
Hopefully this helps! Good luck. -
Whenever i try to sync my ipod a message keeps coming up saying "1 or more items could not be synced", apparently its error -69. Please help, i've tried rebooting my laptop, installing the latest itunes and turning off the wifi but nothing seems to work.
Are you using security software on your PC? If yes, try to disable the software or check the settings. More info here: http://support.apple.com/kb/TS3125
-
Suddenly the sound of my iPods keyboard suddenly becomes very faint bit when I have my headset on its functioning very well please help thanks
Try:
- Reset the iOS device. Nothing will be lost
Reset iOS device: Hold down the On/Off button and the Home button at the same time for at
least ten seconds, until the Apple logo appears.
- Reset all settings
Go to Settings > General > Reset and tap Reset All Settings.
All your preferences and settings are reset. Information (such as contacts and calendars) and media (such as songs and videos) aren’t affected.
- Restore from backup. See:
iOS: How to back up
- Restore to factory settings/new iOS device.
If still problem, make an appointment at the Genius Bar of an Apple store since it appears you have a hardware problem.
Apple Retail Store - Genius Bar -
Displaying Picture in a Java APPLICATION please help!!
I have been trying to write a method that Displays a .jpg file when called. However I have not gotten far, every book I have tell you how to display pictures in an applet but not an application. I did find some code that is supposed to be for an application, but It does not compile right. Any help would be apprecidated!
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class PictureIt{
public void makeImage() {
//***Image Output Stream
String imgFile
= "d:\\temp\\TestImage.jpeg";
out = new FileOutputStream(imgFile);
BufferedImage image = null;
image = (BufferedImage)createImage
(panelJpeg.size.width, panelJpeg.size.height);
Graphics g = image.getGraphics();
panelJpeg.paintAll(g);
}Displaying Picture in a Java APPLICATION please help!!
Hope this helps.There is going to be two classes compile seperatly first class is what does the drawing
here it is
import javax.swing.*;
import java.awt.*;
public class draww extends JPanel {
Image ball;
int width1 = 100;
int height1 = 100;
public draww() {
super();
Toolkit kit = Toolkit.getDefaultToolkit();
ball = kit.getImage("pic1.gif");
public void paintComponent(Graphics comp) {
Graphics2D comp2D = (Graphics2D) comp;
comp2D.drawImage(ball, 20, 20, width1, height1, this);
sound class is the container JFrame here it is
import javax.swing.*;
import java.awt.*;
public class drawing extends JFrame {
public drawing() {
super("draw");
setSize(400,400);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
Container pane = getContentPane();
draww d = new draww();
pane.add(d);
setContentPane(pane);
setVisible(true);
public static void main(String[] args) {
drawing drawing1 = new drawing();
PS Hope this helps and see you around -
My iPod used to be signed in with my moms apple ID but now I have my own. When I opened IMessage it wanted me to sign in, but on the last step it said, "your email can't be verified since its already in use" please help I want to use IMessage.
Hi Kanemelinda8833,
Welcome to the Support Communities!
The article below may be able to help you with this issue.
Associating and verifying email addresses with your Apple ID
http://support.apple.com/kb/HE68
Also, make sure you have signed out of your Mom's Apple ID and are signed in with your own Apple ID on this device.
Click on the link to see more details and screenshots.
iOS 6 and OS X Mountain Lion: Link your phone number and Apple ID for use with FaceTime and iMessage
http://support.apple.com/kb/HT5538
Sign out of your Apple ID on all iOS devices, in the following locations:
Settings > Messages > Send & Receive. Tap your Apple ID, then tap Sign Out.
Sign in to your Apple ID on your device.
When activation is complete, your Apple ID and all verified email addresses should be visible in Settings > Messages > Receive At
Cheers!
Judy -
In my ipad mini sound is there but somehow display turned off....please help...how to turn on the display
Frozen or unresponsive iPad
Resolve these most common issues:
• Display remains black or blank
• Touch screen not responding
• Application unexpectedly closes or freezes
http://www.apple.com/support/ipad/assistant/ipad/
iPad Frozen, not responding, how to fix
http://appletoolbox.com/2012/07/ipad-frozen-not-responding-how-to-fix/
iPad Frozen? How to Force Quit an App, Reset or Restart Your iPad
http://ipadacademy.com/2010/11/ipad-frozen-how-to-force-quit-an-app-reset-or-res tart-your-ipad
Black or Blank Screen on iPad or iPhone
http://appletoolbox.com/2012/10/black-or-blank-screen-on-ipad-or-iphone/
What to Do When Your iPad Won't Turn On
http://ipad.about.com/od/iPad_Troubleshooting/ss/What-To-Do-When-Your-Ipad-Wo-No t-Turn-On.htm
iOS: Not responding or does not turn on
http://support.apple.com/kb/TS3281
Home button not working or unresponsive, fix
http://appletoolbox.com/2013/04/home-button-not-working-or-unresponsive-fix/
Fixing an iPad Home Button
http://tinyurl.com/om6rd6u
iPad: Basic troubleshooting
http://support.apple.com/kb/TS3274
Cheers, Tom -
I would like to change my Visa card from the account but its not changing and the billing information is not changing and I can't purchase any thing from my account its now not usable please help me to solve the problem
You made a purchase and exhausted the credit on your card before it processed. All purchases are final. Contact iTunes Store support. You need to settle up before you can purchase or download anything else.
-
I just got the iPhone 5 and noticed that the message alerts will only alert once . I have it set up as 3 times and its not working . Please help. I'm running 6.0.2 and I really starting to get ****** off with apple products
Instead of getting annoyed, read the User's Guide and try basic troubleshooting.
-
I just downloaded itunes to my windows xp and now EVERYTHING is abit blurry. Its not a virus.Please help?
I just downloaded itunes to my windows xp and now EVERYTHING is abit blurry. Its not a virus.Please help?
-
i have update my 3g software to 4.21 but its not working when it come to restoring firmware its show a error please help me out
That error shows up when a phone is jailbroken or you are trying to downgrade the iOS version. Neither of which is supported by apple.
-
my personal hotspot option is missing from the settings , please help me out
<Email Edited by Host>It's a really bad idea to post your email address - it's an invitation to spam - and I've asked the Hosts to remove it.
-
I have an iMac with 269 songs i would like to transfer music from my macbook with 10917 song s to the imac to free up space on the macbook without loosing my 269 song please help.
Welcome to the Apple Community.
If both Macs are on the same network, enable homesharing, you can then import music from one to the other without affecting what's already on there. -
My iphone 5 screen is turning grey I dnt knw wht causes that and how to fix it.Others said my Lcd is finished others said its a virus..Please help wht might be the cause of this.
Take it in for testing.
Barry -
why i cant install adobe creative cloud - i try to download afew time's when i start the install its turns off..please help me fix that i wanna try AI
when its go to downloading Creative cloud to des its go downhttp://prntscr.com/4iaboa
http://prntscr.com/4iabrvx
anyone can help me please?
Maybe you are looking for
-
Fire Wire: MBP OS X.4.11 Can't see external devices. PLEASE HELP!
Fire Wire: MBP OS X.4.11 Can't see external devices. PLEASE HELP! My MBP will not "see" my new MB or my back-up drive-both connected via a firewire 400 (6 pin) cable. Both running Tiger X.4.11 I have used this cable to connect my MBP and a TiBook in
-
Hi Can somebody tell me how can i generate a REPORTS wherein it shows our CHECKS ISSUED TO SUPPLIERS as payments? Also would show the Invoice Number, Invoice Amount, Payment Date and Maturity Date... Your help is very much appreciated... janna
-
HT4623 how can i update iOS 3.1.2 to 4.3.
how can i update iOS 3.1.2 to 4.3.
-
Some objects refuse to scale in size when moved
Say I have three circles on a slide. I want to animate a move of each circle to another section of the slide and I want the circles to either shrink or grow as they move. I can do this with two of the circles with no problem, but the last one will on
-
Webcam and Whiteboard not working with Adobe AIR with Adobe Flash Builder
Hi, I am trying to build a simple chat service using Adobe Flash Builder target for desktop AIR( my final objective is to port it to android). My adobe AIR version is 2.5.0 and below is my source code: <?xml version="1.0" encoding="utf-8"?> <s:Windo