Dynamic resizing in JDialog using setSize not working properly

Hi,
I have a dialog in which i have two radio buttons.
As i click on other radio button the size of the dialog should change.
I did so using setSize.
As i change the size from smaller dialog to a bigger one then newly created portion is not painted properly. Although the size is increased but the painting of the new portion is not done fine.
Any ideas?
Is this is a Java bug?
Here is the code snippet:
public MyDialog() {
     Container contentPane = this.getContentPane();
     JPanel radioPanel = new JPanel();
ButtonGroup radioGroup = new ButtonGroup();
mInstancesButton = new JRadioButton("Instances");
mActivitiesButton = new JRadioButton("Activities");
mInstancesButton.setBounds(100,0,100,25);
mActivitiesButton.setBounds(200,0,100,25);
mInstancesButton.addItemListener(this);
mActivitiesButton.addItemListener(this);
radioGroup.add(mInstancesButton);
radioGroup.add(mActivitiesButton);
radioPanel.setLayout(null);
radioPanel.add(mInstancesButton);
radioPanel.add(mActivitiesButton);
radioGroup.setSelected(mInstancesButton.getModel(), true);
     contentPane.add(radioPanel);
     this.setSize(600,300);
public void itemStateChanged(ItemEvent ie) {
Container contentPane = this.getContentPane();
if(ie.getSource().equals(mInstancesButton) && ie.getStateChange() == ie.SELECTED) {
this.setSize(600,300);
else if(ie.getSource().equals(mActivitiesButton) && ie.getStateChange() == ie.SELECTED) {
this.setSize(600, 500);

Hi,
It's only an approach but try a call of validate() or repaint() after re-setting the size of your dialog.
Cheers, Mathias

Similar Messages

  • Dynamic resizing in JDialog using setSize not working properly on solaris

    can anyone help..
    Dynamic resizing in JDialog using setSize is not working properly on solaris, its work fine on windows.
    i have set Jdialog size to setSize(768,364),
    when i dynamically resizing it to setSize(768,575); it doesn't get change but when i move dialog using mouse it gets refreshed.
    this problem is only happening on solaris not on windows.

    Hi,
    It's only an approach but try a call of validate() or repaint() after re-setting the size of your dialog.
    Cheers, Mathias

  • Change Password on first use does not work properly.

    I have created apex application user in Oracle Apex 3.2 as follows
    BEGIN
    APEX_UTIL.CREATE_USER(
    p_user_name => 'NEWUSER1',
    p_web_password => 'secret99');
    END;
    As in the documentation
    p_change_password_on_first_use  IN      VARCHAR2    DEFAULT 'Y',
    User should be prompted to change password at first use. But it does not work properly. There is no such message. Still accepts user to log in with old passord that was first given to the user. I have tried explicitly to ensure change password at first log in. by
    BEGIN
    APEX_UTIL.CREATE_USER(
    p_user_name => 'NEWUSER1',
    p_web_password => 'secret99',
    p_change_password_on_first_use =>'Y');
    END;
    Still does not work. How can I ensure user to change password on first login.
    Hasan Al Mamun
    Programmer
    Bangladesh Bank
    Dhaka, Bangladesh

    Might be a long way around the problem but I would utilize a boolean flag in a column (FIRST_LOGIN) your custom auth table set to 'Y' when you create their account. Then on the login page have a page process something like:
    ** NOT TESTED **
    declare
    v_first VARCHAR2(10;
    v_session NUMBER;
    begin
    v_session := APEX_CUSTOM_AUTH.GET_NEXT_SESSION_ID;
    select FIRST_LOGIN into v_first from AUTH_TABLE where user_name = :P101_USERNAME and :P101_PASSWORD;
    if v_first = 'Y' then
    wwv_flow_custom_auth_std.login(
    P_UNAME => :P101_USERNAME,
    P_PASSWORD => :P101_PASSWORD,
    P_SESSION_ID => v_session,
    P_FLOW_PAGE => :APP_ID||':2' *** THIS IS YOUR PAGE TO HAVE THEM RESET THEIR PASSWORD ***
    else
    wwv_flow_custom_auth_std.login(
    P_UNAME => :P101_USERNAME,
    P_PASSWORD => :P101_PASSWORD,
    P_SESSION_ID => v_session,
    P_FLOW_PAGE => :APP_ID||':1' *** MAIN LOGIN PAGE *****
    EXCEPTION WHEN OTHERS THEN
    *** handled **
    end;
    The page 2 in this example would have an few items for them to enter their new password twice, a page process to update their password in the auth table and then redirect them to the intended first page.
    Not sure if it meets your setup.
    Ricker

  • Buttons using CSS not working properly

    I am using Dreamweaver CS4.
    I can't get buttons to work properly using CSS.
    The buttons are supposed to have a red border around them when inactive (a:link).
    Hovering over the button causes it to change its appearence (this works).
    Clicking the button works.
    Do this then click the BACK arrow.
    Buttons no longer have red border.
    I have tried this with FireFox, IE 7, IE 6 and Safari. They all do the same thing.
    You may see it in action at www.justforso.net/buttons.htm
    What am I doing wrong???
         .....  Thanks for your help 
    Here is the code:
    /* CSS Document */
    Theme Name: Buttons Test
         margin: 0;
         padding: 0;
    body {
         font: 80%/1.6 Trebuchet MS, Verdana, Arial, Helvetica, sans-serif;
         color: black;
    a.example1:link
       font-size:14px;
       font-weight:bold;
       text-decoration:none;
       border-style:outset;
       border-color:red;
       border-width:5px;
       background-color: #FFFFCE;
       width:125px;
       color:navy;
    a.example1:hover
       font-size:14px;
       font-weight:bold;
       text-decoration:none;
       border-style:inset;
       border-color:red;
       border-width:5px;
       background-color: #FFFFCE;
       width:125px;
       color:maroon;
    /* CSS Document */
    /* HTML Document */
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Buttons Test</title>
    <link rel="stylesheet" href="buttons.css" type="text/css" media="screen" />
    </head>
    <body>
    <p> </p>
    <p> </p>
    <A href="http://www.sitepoint.com/" class="example1"> Beginners </A>
    <A href="http://www.sitepoint.com/" class="example1"> Promotion </A>
    <A href="http://www.sitepoint.com/" class="example1"> Site Point </A>
    </body>
    </html>
    /* HTML Document */

    It's because you have created styles only for the :link and :hover pseudo-classes. Your buttons revert to the default state when the link is active (being clicked) or has been visited. You need to assign properties to the :visited and :active pseudo-classes as well.
    Another point about your CSS is that you're failing to make use of the cascade. There's no need to repeat values that don't change. I have rewritten your CSS like this:
    a.example1
       font-size:14px;
       font-weight:bold;
       text-decoration:none;
       border-width:5px;
       border-color:red;
       background-color: #FFFFCE;
       width:125px;
       color:navy;
    a.example1:link, a.example1:visited {
         border-style:outset;
    a.example1:hover, a.example1:active
       border-style:inset;
       color:maroon;
    This applies common rules to the basic a.example1 selector, and sets the overrides for the pseudo-classes.
    One other point. You're using an XHTML DOCTYPE. All tag names MUST be in lowercase to be valid. This is wrong:
    <A href="http://www.sitepoint.com/" class="example1"> Beginners </A>
    The opening and closing <a> tags should be in lowercase.

  • Links using anchors not working properly to some people

    on this site:
    http://www.thevpp.ca
    I used anchors to link the show ads on either side of the page to the appropriate section of the show page. This works perfectly in Safari, Firefox (on mac) and IE (on PC).
    Our client and one other person have complained that the link to "GodSpell" opens "Heart & Soul" in the centre of the page instead of GodSpell, but I cannot duplicate this. I can't find out what browser / version / OS they're using as they don't know.
    Clicking on the GodSpell image on the home page takes you to shows.html#b which is GodSpell. (Heart & Soul is shows.html#a)
    They say the other show links work perfectly. I thought initially their browser might not support anchors, but if the others work, then I don't get why this one doesn't.
    Is there a better way to link these images than using anchors? Could the problem be that the anchor links are within a ProjectVIII scroller?

    A few code errors to check:
    http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Fwww.thevpp.ca%2Fshows.html%23b
    I see several problems.  In Firefox 12, the only links that work consistently for me are "Love Letters" and "Sinatra".   If I use the custom scrollbar and go all the way down to "Sinatra," the links don't trigger anything.  Same thing happens in Chrome.
    For an alternate approach, I created a named anchors demo (without tables).  You'll see there is ample space between each of the named anchor regions (view page source to see the code).
    http://alt-web.com/TEMPLATES/FixedLayout.shtml
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists 
    http://alt-web.com/
    http://twitter.com/altweb
    http://alt-web.blogspot.com/

  • Outlook 2013 sending email using template not working properly...

    I've created several email templates by doing the following:
    open new message
    add some tekst in the body
    save as > oft file
    Now when I open such oft file I add some modifications in the body text and send the message. However, the send item does not contain the modifications I just made, only the text that was included in the template.
    We're using Outlook 2013 SP1 (with all microsoft updates installed) with Exchange 2013 SP1 standalone server. Is this a Outlook or Exchange issue and how can I resolve this?
    Thnx Remco

    Hi Remco,
    Please also try to start Outlook in safe mode and test again to check if this issue continues. To start Outlook in safe mode, press Windows key + R to open the Run command, type
    outlook /safe and press Enter.
    If problem continues in Outlook safe mode, please try creating a new mail profile and reconfigure your email account, then creating a .oft template to test this issue again. For your convenience:
    http://office.microsoft.com/en-in/outlook-help/create-an-outlook-profile-HA102749460.aspx
    Please let me know the result.
    Regards,
    Steve Fan
    Forum Support
    Come back and mark the replies as answers if they help and unmark them if they provide no help.
    If you have any feedback on our support, please click
    here

  • SetSize() not working properly in FlowLayout

    I've a JPanel which holds 11 JButtons. The JPanel's layout is FlowLayout. I've Images on all the JButtons.
    I've setSize of the JPanel according to the JButtons width & Height which is also set according to the Images width & Height.
    But the JButtons size is more than the Image & the look of the app is not pleasing because of it.
    Is the problem because of the FlowLayout or something?
    Edited by: aLkeshP on 28 May, 2011 8:49 AM

    No. The LayoutManager is what set the size of the components. You might be looking to change the button margins.

  • Resize() of applet is not working properly in java6.0

    Hi iam new to applets i have given one task,that is to display multiple tiff pages in applet, So i have written one applet which displays multiple pages tiff file, i have kept next and previous buttons in the applet to navigate to different pages and here iam using resize() of applet for refreshing applet up to now all fine this all thing i have done in java5.0, but i got a requirement to do in java6.0, in java6.0 applet is not refeshing in the webpage.
    i found the reason that resize() is not working properly.
    Please can someone help me..........
    Thanks&Regards
    Manmohan A

    Dear Aravindth
      (.*?) means -> Select all contents from where you start and end,
    For Ex. <month>(.*?)</month> then Select for start <month> and end last </month> tag.
    (?) Match zero or one occurrences. Equivalent to {0,1}.
    (*) Match zero or more occurrences. Equivalent to {0,}.
    (+) Match one or more occurrences. Equivalent to {1,}.
    (.) (Dot). Match any character except newline or another Unicode line terminator.
    (.*?) means -> Zero or more times Match any character except newline or another Unicode line terminator + Match zero or more occurrences. Equivalent to {0,}.+Match zero or one occurrences. Equivalent to {0,1}.
    Could you please refere the below cite :
    http://www.javascriptkit.com/jsref/regexp.shtml
    Thanks & Regards
    T.R.Harihara SudhaN

  • Resize photos option in Preview not working

    I use Preview to resize my photos depending on where I'm posting or sending to. Since I've downloaded Yosemite I will resize photo  and it's not working. I have my photos in iCloud drive & am working between an iMac and a iMac Pro. I'm trying to resize to send out to  have printed vs. at home printing. This problem has only happened since upgrading to Yosemite. Any suggestions would be helpful.

    Resizing works fine here.
    Best practice is:
    Open image in Preview
    Tools > Adjust size;    enter the new values and click OK
    Press the option button then     File Save As give it a new name and save to desktop

  • My iPhone 6 ear speaker is not working properly I couldn't able to hear any thing from ear speaker to lissen I had to put on loud speaker or to use handsfree please help me out with this problem if some body have answer?

    My iPhone 6 ear speaker is not working properly I couldn't able to hear any thing from ear speaker to listen I had to put on loud speaker or to use hands free please help me out with this problem if some body have answer?

    Hi Venkata from NZ,
    If you are having an issue with the speaker on your iPhone, I would suggest that you troubleshoot using the steps in this article - 
    If you hear no sound or distorted sound from your iPhone, iPad, or iPod touch speaker - Apple Support
    Thanks for using Apple Support Communities.
    Best,
    Brett L 

  • My speaker is not working properly in 4s if i use headphone its working now my volume increase decrease button is also not working properly how can i solve it pl help me my warranty finished

    my speaker is not working properly in 4s if i use headphone its working now my volume increase decrease button is also not working properly how can i solve it pl help me my warranty finished

    Hello. I sent my WRT1900AC V1 to Linksys four days ago (Monday) via UPS with a RMA. Linksys paid the shipping and everything. The router is still in route, and it should arrive to their offices tomorrow. Once they receive the WRT1900 AC V1, they are going to send me an EA8500 as a replacement. But I have been reading the comments about the EA8500 here in the forum and it seems to have the same problems. I guess the firmware is extremely flawed in both routers (maybe it is almost the same code?). Anyway, I will try the EA8500 and I hope it works. I bought a temporary router from Walmart and I paid $35 for it. It is a Belink N600 DB. I can't believe that a $35 router is working a lot, lot, lot better than my previous $250 WRT1900AC router. Unbelievable. If the EA8500 doesn't work, I'm going to try and get my money back from Linksys, or contact The Consumerist or someone to get my money back and get a Nighthawk instead.

  • Hi, My face time is not working properly in my computer and mi iPhone, some of the people that i used to contact a can't talk to anymore, and some i can. Its not working in my mac nor in my iPhone, it just shows legend that says face time error

    Hi, My face time is not working properly in my computer and mi iPhone, some of the people that i used to contact a can't talk to anymore, and some i can. Its not working in my mac nor in my iPhone, it just shows legend that says face time error, what can i do???

    Assign an email address (gmail.com?)
    Using FaceTime http://support.apple.com/kb/ht4319
    Troubleshooting FaceTime http://support.apple.com/kb/TS3367
    The Complete Guide to FaceTime + iMessage: Setup, Use, and Troubleshooting
    http://tinyurl.com/a7odey8
    Troubleshooting FaceTime and iMessage activation
    http://support.apple.com/kb/TS4268
    Using FaceTime and iMessage behind a firewall
    http://support.apple.com/kb/HT4245
    iOS: About Messages
    http://support.apple.com/kb/HT3529
    Set up iMessage
    http://www.apple.com/ca/ios/messages/
    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
    How to Set Up & Use iMessage on iPhone, iPad, & iPod touch with iOS
    http://osxdaily.com/2011/10/18/set-up-imessage-on-iphone-ipad-ipod-touch-with-io s-5/
    Troubleshooting Messages
    http://support.apple.com/kb/TS2755
    Troubleshooting iMessage Issues: Some Useful Tips You Should Try
    http://www.igeeksblog.com/troubleshooting-imessage-issues/
    Setting Up Multiple iOS Devices for iMessage and Facetime
    http://macmost.com/setting-up-multiple-ios-devices-for-messages-and-facetime.htm l
    FaceTime and iMessage not accepting Apple ID password
    http://www.ilounge.com/index.php/articles/comments/facetime-and-imessage-not-acc epting-apple-id-password/
    Unable to use FaceTime and iMessage with my apple ID
    https://discussions.apple.com/thread/4649373?tstart=90
    How to Block Someone on FaceTime
    http://www.ehow.com/how_10033185_block-someone-facetime.html
    My Facetime Doesn't Ring
    https://discussions.apple.com/message/19087457
    To send messages to non-Apple devices, check out the TextFree app https://itunes.apple.com/us/app/text-free-textfree-sms-real/id399355755?mt=8
    How to Send SMS from iPad
    http://www.iskysoft.com/apple-ipad/send-sms-from-ipad.html
    You can check the status of the FaceTime/iMessage servers at this link.
    http://www.apple.com/support/systemstatus/
     Cheers, Tom

  • I have safari 5.1.7 and it's not working properly. Should I use Safari 5.1.9 or 6.0.4?

    I have safari 5.1.7 and it's not working properly. Should I use Safari 5.1.9 or 6.0.4? Mac OS X 10.6.8.  17" MacBook Pro

    Use your Software Update under the Apple menu, it SHOULD bring Safari up to 5.1.9 on OS X 10.6.8.
    Apple IS issuing security and other updates for Snow Leopard users.
    OS X 10.4/10.5 need to upgrade, 10.6.8 ok still
    Safari 6+ is only for 10.7+ users as OS X is morphing into iOS.
    10.7 and 10.8 will not run your PPC based apps of 10.5/10.6
    If Software Update is not working, then you have other issues, backup your users folders off the machine to a external storage drive (not TimeMachine!) and run through this list of fixes.
    Most commonly used backup methods
    ..Step by Step to fix your Mac

  • I have lost track of the number of websites that do not work properly on the iPad without Adobe Flash player which is unsupported. I cannot use retail sites, billing sites and most important of all job application sites. All are missing tabs, links, info

    I have lost track of the number of websites which do not work properly on my iPad. They include retail sites, billing sites and most important of all job application sites. They all seem to require Adobe Flash Player which cannot be downloaded onto an iPad. Skyfire does not solve the problem. They all load without vital parts of the site such as tabs, links and correct formatting. Any suggestions?

    Most such brower/service combinations have a difficult time working with Flash-based apps and often fail completely. Flash videos are usually the most successful content these browers can handle. You can try the others apps - Puffin, iSwifter, etc - but you may find that none of them work, in which case you will not be able to use your iPad with these sites other than by using one of the various remote control solutions to take over a computer running the full Flash Player.
    IMHO, any developer that built a Flash application for a billing or job application site was an idiot, but I know that's out of the control of anyone but the relevant company.
    Regards.

  • I am using Ubuntu; iTunes installed via wine is not working properly. So how should i sync my apps on iTunes and device?          When will iTunes come to Ubuntu

    I am using Ubuntu; iTunes installed via wine is not working properly. So how should i sync my apps on iTunes and device?
    When will iTunes come to Ubuntu?

    See:
    *http://kb.mozillazine.org/Firefox_crashes
    *https://support.mozilla.org/kb/Firefox+crashes
    If you have submitted crash reports then please post the IDs of one or more recent crash reports that have this format:
    *bp-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
    You can find the IDs of the submitted crash reports on the <i>about:crashes</i> page.
    *You can open the <b>about:crashes</b> page via the location bar, like you open a website, or open this page via "Help > Troubleshooting Information".
    See:
    *http://kb.mozillazine.org/Mozilla_Crash_Reporter
    *https://support.mozilla.org/kb/Mozilla+Crash+Reporter

Maybe you are looking for

  • Verify HA Cluster setup in Oracle Virtual machine thru GUI

    Hi All, I have setup 3 node cluster with HA[Oracle VM] enabled.When i checked in the GUI it shows "High availability Infrastructure works well" like that. For testing HA, I poweroff one of the Oracle Virtual server node from the Oracle Virtual manage

  • Alphabetize Artist Name without "The"

    Hey, I know it's pretty silly, but before the last itunes upgrade artist were alphabetized without the "The". That is, you could find "The Strokes" in the S and "The Killers" in the K. I liked that a lot, how can I go back to it with itunes 7.0.1? It

  • Remove Carriage Return between elements

    Hi All, Below is my xml document: <Message> <AccNo>100</AccNo> </Message> I want to convert the above document as: <Message><AccNo>100</AccNo></Message> I mean, without carriage return in between elements. The above two documents are generaring a dif

  • Calculate responce time

    dear all, How do I calculate average response time per sql. And the time displayed is secs or milli-secs using oracle 9i Regards and thanks a lot SL Message was edited by: user480060

  • Problem dividing fact by dimension

    I have a fact column "Course Enrollments" and a dimension "Program Projections". There is a hierarchy which goes like , Marketing line ---> Program----> Course. I need the results at the highest level of aggregation, 'Marketing line'. When I do a sum