JDialog boxes aren't drawing properly

Hi
I'm busy designing the front end for my final year project at uni (on Netbeans 5.5, although I doubt the problem is due to that), and I've suddenly started getting some strange problems with dialog boxes (seems to be since updating to Java 1.6 SDK, although this could be a co-incidence. The dialog boxes are displaying, but with holes in them, so you can see right through to the main frame underneath, then moving the dialog box will cause it to disappear completely,. only showing components on it when you go over them with the move, but never the background. I managed to combat most of this but making it run:
this.update(this.getGraphics());
every time the dialog box is instantiated and on the component move and shown events. This has solved the problem with holes appearing in the window (even if it does create a rather weird trailing effect), but the title bar and border do not refresh, and both still appear initially with holes, eventually completely disappearing.
The GUI itself does not do anything weird with the dialog box (well now it does with havign to manually trigger the update), it did use different lookandfeels, but I've commented out that for the moment (to no avail).
This does seem to be quite a big, but I've not found any help on google for this (ah, the friend of all programmers, surely). I've ran the distribution jar files on multiple computers using multiple version of java (well 1.6 and 1.5), and the problem persists. I've check Netbeans generated code, and I can't fault it. I was just wondering if anyone had any idea of a workaround? Even somehow repainting/updating the title and border as well as the main dialog box, or a cure for the bug? Just so I can get some screenshots.
Thank you for any assistance you can give me.
Alex

Just a quick follow-up in case anyone else runs into this problem (and it may well be a few people do), I had to disable aceleration down to disabling DirectX and Direct3D (so you don't have top disable it full), and seems to suggest that there is a [problem with the way that JAVA works with DirectX (or DirectX works with JAVA I suppose, but as this is a recent problem, I would imagine it may well be JAVA which is at fault IMHO).
Alex                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Similar Messages

  • After upgrading, multiple applications aren't working properly

    I recently upgraded from OX 10.3 to Tiger, and a lot of my applications aren't working properly. My computer is almost exactly 2 years old (I bought it in early January 2005) and otherwise has been running fine.
    When I use Safari, every time a page loads a box comes up saying, "Keychain Not Found. Keychain "mcurtiss" cannot be found to store "Safari." I've tried clicking both cancel and reset to defaults, but either way it still keeps happening. I've checked under Keychains and the mcurtiss keychain is there, so I don't know what else to do to fix that.
    I also have Firefox, but now that isn't working properly either. It keeps freezing and I have to Force Quit (at which point it's written in red text and says "Not Responding). This happens at least 2-3 times every time I try to use Firefox.
    DVD Player is doing basically the same thing-- working very slowly or freezing-- and I have to Force Quit it as well. It also says "Not Responding" in red when this happens.
    It's happened a few times with other applications, but with those three it's basically all the time. Can anyone give me any ideas of how to fix this?
    Thanks!

    Spotlight among other things will scan the bookmarks and add them to your list of bookmarks. To tell if Spotlight is still indexing, go to its menu (the blue circle with white magnifying glass in the upper right), and see if you see anything other than Spotlight and the search field when there is nothing in the search field telling you that indexing is happening. If you search for a known file and it isn't visible in Spotlight that could indicate your Spotlight index is corrupt. To reindex Spotlight, go to Apple menu -> System Preferences -> Spotlight, and remove and add the hard drive to the Privacy section.
    If you are getting errors which can't be fixed with Keychain First Aid, and the problem seems to be especially bad with Safari, it suggests that the file that manages you cookies has gotten corrupt. How full is your hard disk?
    Is your data backed up?

  • Help needed: Creating web link in JDialog Box

    I'm in need of this urgently, any help would be much appreciated. I'm currently display some information in a JDialog box when an item is clicked in a JApplet.
    I need to display a weblink within the dialog box.
    Thanks anyone

    I am using JDeveloper 10.1.3.3.0. Thanks Heaps

  • Web pages aren't loading properly

    Since installing Mavericks Web pages aren't loading properly. Neither with safari nor chrome. I've added the Open DNS to the DNS pane but makes no difference. Many pages don't download images, and look like the CSS hasn't loaded either. Have emptied browser caches too.

    So, I changed my DNS servers to Google's (8.8.8.8 and 8.8.4.4) and all is well.

  • Focus on JTextfield in JDialog box

    A JDialog box is being opened from a menu.
    There is only one JTextfield on the dialog box and 2 buttons.
    The focus is not on any of the components in the dialog box and I want it on the textfield by default.
    I have tried all the requestFocus(),requestDefaultFocus(),grabfocus() etc and none of them work.
    There is an eventListener added to the JTextfield could this be the problem.

    I am a little supprised that the focus is not given to the text field if that is the only thing on the dialog.
    You could try detecting the display of the dialog and then giving the focus to the text field. Focus will not be given to a component if the component cant be displayed at that time. My guess is that the dialog is still hidden when you are trying to set the focus and that is what is causing the problem.

  • Hard drive upgrade...now some programs aren't running properly

    I've recently upgraded my hd...Now my iphoto and photoshop aren't running properly. My photoshop elements tries to boot up then says that it can't boot becuase the disk is not available. My iphoto won't recognize any photos when a camera is trying to import them. Everything else works great but these are the only two issues. Please help

    I don't really use these programs anymore so no worries.

  • I keep getting the dialogue box: itunes was not properly installed?

    I keep getting the dialogue box: itunes was not properly installed?

    Microsoft Windows 7 x64 Home Premium Edition Service Pack 1 (Build 7601)
    Acer Aspire X3300
    iTunes 11.0.1.12
    QuickTime 7.7.3
    FairPlay 2.2.32
    Apple Application Support 2.3.2
    iPod Updater Library 10.0d2
    CD Driver Not Available
    CD Driver DLL Not Available
    Apple Mobile Device 6.0.1.3
    Apple Mobile Device Driver 1.63.0.0
    Bonjour 3.0.0.10 (333.10)
    Gracenote SDK 1.9.6.502
    Gracenote MusicID 1.9.6.115
    Gracenote Submit 1.9.6.143
    Gracenote DSP 1.9.6.45
    iTunes Serial Number 003BB9400AA69B20
    Current user is an administrator.
    The current local date and time is 2013-01-07 11:21:05.
    iTunes is not running in safe mode.
    WebKit accelerated compositing is enabled.
    HDCP is not supported.
    Core Media is supported.
    Video Display Information
    NVIDIA, NVIDIA GeForce 9200
    **** External Plug-ins Information ****
    No external plug-ins installed.
    Genius ID: 9d1bbe5cdb74c7ff7d5b531e745c1537
    iPodService 11.0.1.12 (x64) is currently running.
    iTunesHelper 11.0.1.12 is currently running.
    Apple Mobile Device service 3.3.0.0 is currently running.
    **** CD/DVD Drive Tests ****
    LowerFilters: UBHelper (2.0.0.11),
    UpperFilters: NTIDrvr (1.0.0.9),
    Failed loading CD / DVD drives, error -43. Try doing a repair install on iTunes from the “Add or Remove Programs” control panel.

  • Forefront Endpoint Protection 2010 Antimalware Activity and Antimalware Protection Summary Reports aren't rendering properly.

    The Antimalware Activity and Antimalware Protection Summary Reports aren't rendering properly.  When I export them to PDF, they look normal but when I run either one of these reports through they don't display properly.  In the Antimalware
    Protection Summary report, the Latest Antimalware Protection Summary title bar has been extended and the Status legend is coved by white space and Latest Antimalware Definitions Summary title bar has been extended and Period legend
    are covered by white space.  On the same page the Antimalware Protection History-Week has been flushed to the right to where it only dispays Antimalw and the Antimalware Definitions History-Week has been flushed to the right to where it only dispays
    Antimalw.  On the Antimalware Activity the Actions legend has been flushed to the left.

    This is an old question but you may try it using the latest version of Forefront Endpoint Protection or System Center Endpoint Protection and let us know if you are able to reproduce the problem. There are many improvements in latest release of SCEP and
    FEP.

  • KeyEvent calling JDialog box flickers

    On a JFrame I have a button with an ActionPerformed() method. On pressing the button a dialog box pops up on the screen as it is meant to do. This functionality is also needed to be assigned to the 'F1' key as well. In the same class I have a keyReleased() method that listens when the F1 key is pressed. For the VK_F1 KeyEvent I have put the same lines of code that I put in the ActionPerformed() method of the button. When F1 is pressed, the JDialog appears but it flickers for the first few seconds which is annoying. Does any one know why the JDialog box flickers and how to solve this.

    has any one got any sugguestions how to solve a flickering JDialog box in general???

  • Problem with JDialog box

    Hi Guys,
    I have a problem with the JDialog box. The close button (Cross mark of the box) is not displayed when I was trying to use my custom LookAndFeel and Custom theme. I am pasting the code sample here.
    import java.awt.Color;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.awt.event.WindowAdapter;
    import java.awt.event.WindowEvent;
    import javax.swing.Icon;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.LookAndFeel;
    import javax.swing.SwingUtilities;
    import javax.swing.UIDefaults;
    import javax.swing.UIManager;
    import javax.swing.plaf.ColorUIResource;
    import com.jgoodies.looks.plastic.Plastic3DLookAndFeel;
    import com.jgoodies.looks.plastic.PlasticTheme;
    import com.medplexus.looks.plastic.theme.SkyGreen;
    public class TestTheDialog implements ActionListener {
    JFrame mainFrame = null;
    JButton myButton = null;
    public TestTheDialog() {
    mainFrame = new JFrame("TestTheDialog Tester");
    mainFrame.addWindowListener(new WindowAdapter() {
    public void windowClosing(WindowEvent e) {System.exit(0);}
    try{
         MyLookAndFeel.setCurrentTheme(new CustomLaF());
         UIManager.setLookAndFeel(new MyLookAndFeel());
         SwingUtilities.updateComponentTreeUI(mainFrame);
         CustomDialog cd = new CustomDialog();
         cd.setDefaultLookAndFeelDecorated(true);
    catch(Exception e){
    myButton = new JButton("Test the dialog!");
    myButton.addActionListener(this);
    mainFrame.setLocationRelativeTo(null);
    mainFrame.getContentPane().add(myButton);
    mainFrame.setSize(200, 150);
    //mainFrame.pack();
    mainFrame.setVisible(true);
    public void actionPerformed(ActionEvent e) {
    if(myButton == e.getSource()) {
    System.err.println("Opening dialog.");
    CustomDialog myDialog = new CustomDialog(mainFrame, true, "Do you like Java?");
    System.err.println("After opening dialog.");
    if(myDialog.getAnswer()) {
    System.err.println("The answer stored in CustomDialog is 'true' (i.e. user clicked yes button.)");
    else {
    System.err.println("The answer stored in CustomDialog is 'false' (i.e. user clicked no button.)");
    static class CustomLaF extends PlasticTheme {
    protected ColorUIResource getPrimary1() {
    return new ColorUIResource(255,128,0);
    public ColorUIResource getPrimary2() {
              return (new ColorUIResource(Color.white));
         public ColorUIResource getPrimary3() {
              return (new ColorUIResource(255,128,0));
    public ColorUIResource getPrimaryControl() {
    return new ColorUIResource(Color.GREEN);
    protected ColorUIResource getSecondary1() {
    return new ColorUIResource(Color.CYAN);
    protected ColorUIResource getSecondary2() {
              return (new ColorUIResource(Color.gray));
         protected ColorUIResource getSecondary3() {
              return (new ColorUIResource(235,235,235));
         protected ColorUIResource getBlack() {
              return BLACK;
         protected ColorUIResource getWhite() {
              return WHITE;
         private Object getIconResource(String s) {
    return LookAndFeel.makeIcon(getClass(), s);
    private Icon getHastenedIcon(String s, UIDefaults uidefaults) {
    Object obj = getIconResource(s);
    return (Icon) ((javax.swing.UIDefaults.LazyValue) obj).createValue(uidefaults);
    static class MyLookAndFeel extends Plastic3DLookAndFeel {
              protected void initClassDefaults(UIDefaults table) {
                   super.initClassDefaults(table);
              protected void initComponentDefaults(UIDefaults table) {
                   super.initComponentDefaults(table);
                   Object[] defaults = {
                             "MenuItem.foreground",new ColorUIResource(Color.white),
                             "MenuItem.background",new ColorUIResource(Color.gray),
                             "MenuItem.selectionForeground",new ColorUIResource(Color.gray),
                             "MenuItem.selectionBackground",new ColorUIResource(Color.white),
                             "Menu.selectionForeground", new ColorUIResource(Color.white),
                             "Menu.selectionBackground", new ColorUIResource(Color.gray),
                             "MenuBar.background", new ColorUIResource(235,235,235),
                             "Menu.background", new ColorUIResource(235,235,235),
                             "Desktop.background",new ColorUIResource(235,235,235),
                             "Button.select",new ColorUIResource(255,128,0),
                             "Button.focus",new ColorUIResource(255,128,0),
                             "TableHeader.background", new ColorUIResource(255,128,0),
                             "TableHeader.foreground", new ColorUIResource(Color.white),
                             "ScrollBar.background", new ColorUIResource(235,235,235),
                             "OptionPane.questionDialog.border.background", new ColorUIResource(Color.gray),
                             "OptionPane.errorDialog.titlePane.foreground", new ColorUIResource(Color.white),
                             "OptionPane.questionDialog.titlePane.background", new ColorUIResource(255,128,0),
                             "InternalFrame.borderColor", new ColorUIResource(Color.gray),
                             "InternalFrame.activeTitleForeground", new ColorUIResource(Color.white),
                             "InternalFrame.activeTitleBackground", new ColorUIResource(Color.gray),
                             "InternalFrame.borderColor", new ColorUIResource(Color.white),
                             "Table.selectionBackground",new ColorUIResource(255,128,0)
                   table.putDefaults(defaults);
    public static void main(String argv[]) {
    TestTheDialog tester = new TestTheDialog();
    package CustomThemes;
    import javax.swing.JDialog;
    import java.awt.event.ActionListener;
    import javax.swing.JPanel;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JButton;
    import java.awt.event.ActionEvent;
    public class CustomDialog extends JDialog implements ActionListener {
    private JPanel myPanel = null;
    private JButton yesButton = null;
    private JButton noButton = null;
    private boolean answer = false;
    public boolean getAnswer() { return answer; }
    public CustomDialog(){
    public CustomDialog(JFrame frame, boolean modal, String myMessage) {
    super(frame, modal);
    setTitle("Guess?");
    myPanel = new JPanel();
    getContentPane().add(myPanel);
    myPanel.add(new JLabel(myMessage));
    yesButton = new JButton("Yes");
    yesButton.addActionListener(this);
    myPanel.add(yesButton);
    noButton = new JButton("No");
    noButton.addActionListener(this);
    myPanel.add(noButton);
    setDefaultCloseOperation(EXIT_ON_CLOSE);
    pack();
    setLocationRelativeTo(frame);
    setVisible(true);
    public void actionPerformed(ActionEvent e) {
    if(yesButton == e.getSource()) {
    System.err.println("User chose yes.");
    answer = true;
    setVisible(false);
    else if(noButton == e.getSource()) {
    System.err.println("User chose no.");
    answer = false;
    setVisible(false);
    Thanks and Regards
    Kumar.

    Hi All,
    I am using the JGoodies Look and feel (looks2.0.1.jar). I wrote my own custom LookAndFeel and Theme , but the problem with this is the JDialog/JOptionPane dialog boxes are displayed with out the close button (cross button on the titlebar).
    I am pasting the code here.
    import java.awt.Color;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.awt.event.WindowAdapter;
    import java.awt.event.WindowEvent;
    import javax.swing.Icon;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.LookAndFeel;
    import javax.swing.SwingUtilities;
    import javax.swing.UIDefaults;
    import javax.swing.UIManager;
    import javax.swing.plaf.ColorUIResource;
    import com.jgoodies.looks.plastic.Plastic3DLookAndFeel;
    import com.jgoodies.looks.plastic.PlasticTheme;
    import com.medplexus.looks.plastic.theme.SkyGreen;
    public class TestTheDialog implements ActionListener {
        JFrame mainFrame = null;
        JButton myButton = null;
        public TestTheDialog() {
            mainFrame = new JFrame("TestTheDialog Tester");
            mainFrame.addWindowListener(new WindowAdapter() {
                    public void windowClosing(WindowEvent e) {System.exit(0);}
            try{
                 MyLookAndFeel.setCurrentTheme(new CustomLaF());
                 UIManager.setLookAndFeel(new MyLookAndFeel());
                 //Plastic3DLookAndFeel.setCurrentTheme(new SkyGreen());
                 //UIManager.setLookAndFeel(new Plastic3DLookAndFeel());
                 SwingUtilities.updateComponentTreeUI(mainFrame);
                 CustomDialog cd = new CustomDialog();
                 cd.setDefaultLookAndFeelDecorated(true);
            catch(Exception e){
            myButton = new JButton("Test the dialog!");
            myButton.addActionListener(this);
            mainFrame.setLocationRelativeTo(null);
            mainFrame.getContentPane().add(myButton);
            mainFrame.setSize(200, 150);
            //mainFrame.pack();
            mainFrame.setVisible(true);
        public void actionPerformed(ActionEvent e) {
            if(myButton == e.getSource()) {
                System.err.println("Opening dialog.");
                CustomDialog myDialog = new CustomDialog(mainFrame, true, "Do you like Java?");
                System.err.println("After opening dialog.");
                if(myDialog.getAnswer()) {
                    System.err.println("The answer stored in CustomDialog is 'true' (i.e. user clicked yes button.)");
                else {
                    System.err.println("The answer stored in CustomDialog is 'false' (i.e. user clicked no button.)");
        static class CustomLaF extends PlasticTheme {
            protected ColorUIResource getPrimary1() {
              return new ColorUIResource(255,128,0);
            public ColorUIResource getPrimary2() {
                  return (new ColorUIResource(Color.white));
             public ColorUIResource getPrimary3() {
                  return (new ColorUIResource(255,128,0));
            public ColorUIResource getPrimaryControl() {
              return new ColorUIResource(Color.GREEN);
            protected ColorUIResource getSecondary1() {
              return new ColorUIResource(Color.CYAN);
            protected ColorUIResource getSecondary2() {
                  return (new ColorUIResource(Color.gray));
             protected ColorUIResource getSecondary3() {
                  return (new ColorUIResource(235,235,235));
             protected ColorUIResource getBlack() {
                  return BLACK;
             protected ColorUIResource getWhite() {
                  return WHITE;
             private Object getIconResource(String s) {
                return LookAndFeel.makeIcon(getClass(), s);
            private Icon getHastenedIcon(String s, UIDefaults uidefaults) {
                Object obj = getIconResource(s);
                return (Icon) ((javax.swing.UIDefaults.LazyValue) obj).createValue(uidefaults);
          static class MyLookAndFeel extends Plastic3DLookAndFeel {
                  protected void initClassDefaults(UIDefaults table) {
                       super.initClassDefaults(table);
                  protected void initComponentDefaults(UIDefaults table) {
                       super.initComponentDefaults(table);
                       Object[] defaults = {
                                 "MenuItem.foreground",new ColorUIResource(Color.white),
                                 "MenuItem.background",new ColorUIResource(Color.gray),
                                 "MenuItem.selectionForeground",new ColorUIResource(Color.gray),
                                 "MenuItem.selectionBackground",new ColorUIResource(Color.white),
                                 "Menu.selectionForeground", new ColorUIResource(Color.white),
                                 "Menu.selectionBackground", new ColorUIResource(Color.gray),
                                 "MenuBar.background", new ColorUIResource(235,235,235),
                                 "Menu.background", new ColorUIResource(235,235,235),
                                 "Desktop.background",new ColorUIResource(235,235,235),
                                 "Button.select",new ColorUIResource(255,128,0),
                                 "Button.focus",new ColorUIResource(255,128,0),
                                 "TableHeader.background", new ColorUIResource(255,128,0),
                                 "TableHeader.foreground", new ColorUIResource(Color.white),
                                 "ScrollBar.background",  new ColorUIResource(235,235,235),
                                 "OptionPane.questionDialog.border.background", new ColorUIResource(Color.gray),
                                 "OptionPane.errorDialog.titlePane.foreground", new ColorUIResource(Color.white),
                                 "OptionPane.questionDialog.titlePane.background", new ColorUIResource(255,128,0),
                                 "InternalFrame.borderColor", new ColorUIResource(Color.gray),
                                 "InternalFrame.activeTitleForeground", new ColorUIResource(Color.white),
                                 "InternalFrame.activeTitleBackground", new ColorUIResource(Color.gray),
                                 "InternalFrame.borderColor", new ColorUIResource(Color.white),
                                 "Table.selectionBackground",new ColorUIResource(255,128,0)
                       table.putDefaults(defaults);
        public static void main(String argv[]) {
            TestTheDialog tester = new TestTheDialog();
    import javax.swing.JDialog;
    import java.awt.event.ActionListener;
    import javax.swing.JPanel;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JButton;
    import java.awt.event.ActionEvent;
    public class CustomDialog extends JDialog implements ActionListener {
        private JPanel myPanel = null;
        private JButton yesButton = null;
        private JButton noButton = null;
        private boolean answer = false;
        public boolean getAnswer() { return answer; }
        public CustomDialog(){
        public CustomDialog(JFrame frame, boolean modal, String myMessage) {
            super(frame, modal);
            setTitle("Guess?");
            myPanel = new JPanel();
            getContentPane().add(myPanel);
            myPanel.add(new JLabel(myMessage));
            yesButton = new JButton("Yes");
            yesButton.addActionListener(this);
            myPanel.add(yesButton);       
            noButton = new JButton("No");
            noButton.addActionListener(this);
            myPanel.add(noButton);
            setDefaultCloseOperation(EXIT_ON_CLOSE);
            pack();
            setLocationRelativeTo(frame);
            setVisible(true);
        public void actionPerformed(ActionEvent e) {
            if(yesButton == e.getSource()) {
                System.err.println("User chose yes.");
                answer = true;
                setVisible(false);
            else if(noButton == e.getSource()) {
                System.err.println("User chose no.");
                answer = false;
                setVisible(false);
    }Thanks and Regards
    Kumar.

  • JDialog boxes

    Hi,
    Just a bit curious whats the best way to creat a JDialog box?
    I currently have have one main panel, with one button. When the user clicks this button, it brind up the dialog box. I dont think i have done this correctly, as when the dialog box populates, when I move it around on the screen, it erases the contents off the panel that called the dialog (erases the contents when i move the dialog accross the screen.
    Can any one help me set out the correct constructors for the DIalog and the panel calling it?
    thanks in advance
    public public class PanelA extends JPanel {
    public class Dialoig Box extends JDialog {
    public class GUI {
    public () {
    //code here to add a jbutton to panelA
    //code here to add PanelA to the frame
    //inner class here . Action listener for the button
    class CheckButtonActionListener
    implements ActionListener {
    public void actionPerformed(ActionEvent event) {
    //Main method here
    Main frame = new Main();

    import javax.swing.*;
    public class Main extends javax.swing.JFrame {
        public Main() {
            initComponents();
        private void initComponents() {
            jPanel1 = new javax.swing.JPanel();
            jButton1 = new javax.swing.JButton();
            setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
            setTitle("Test Dialog Box");
            jButton1.setText("jButton1");
            jButton1.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jButton1ActionPerformed(evt);
            jPanel1.add(jButton1);
            getContentPane().add(jPanel1, java.awt.BorderLayout.CENTER);
            java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
            setBounds((screenSize.width-401)/2, (screenSize.height-411)/2, 401, 411);
        private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
            JDialog dialog = new DialogBox(this,true);
            dialog.setVisible(true);
        public static void main(String args[]) {
            new Main().setVisible(true);
        // Variables declaration - do not modify
        private javax.swing.JButton jButton1;
        private javax.swing.JPanel jPanel1;
        // End of variables declaration
        public class DialogBox extends javax.swing.JDialog {
            public DialogBox(java.awt.Frame parent, boolean modal) {
                super(parent, modal);
                initComponents();
            private void initComponents() {
                jPanel1 = new javax.swing.JPanel();
                jButton1 = new javax.swing.JButton();
                setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
                setTitle("Dialog Box");
                jButton1.setText("jButton1");
                jButton1.addActionListener(new java.awt.event.ActionListener() {
                    public void actionPerformed(java.awt.event.ActionEvent evt) {
                        jButtonActionPerformed(evt);
                jPanel1.add(jButton1);
                getContentPane().add(jPanel1, java.awt.BorderLayout.CENTER);
                java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
                setBounds((screenSize.width-237)/2, (screenSize.height-191)/2, 237, 191);
            private void jButtonActionPerformed(java.awt.event.ActionEvent evt) {
                setVisible(false);
                dispose();
            private javax.swing.JButton jButton1;
            private javax.swing.JPanel jPanel1;
    }

  • 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

  • One inch square box does not draw one inch.

    If I try to draw a square box in any size, illustator does not make it square.
    For example, if I select the Rectangle Tool, click in the art space and set the rectangle to one inch by one inch, I get a box that is 1.0003 by 1.0003
    Here is a screen shot of what I am getting.
    This is also happening to any rectangle and circle.
    Even if I hold down shift to keep the preportions lock, it still happens.
    I have check and nothing is snapping or set to snap.
    This is a major issue for me as I use illustator for creating dielines and those dielines need to be very accurate.

    Jason,
    It seems that something is seriously wrong, or they just fobbed you with an off measure version (the error seems to be far below any Stroke Weight, and Align to Pixel Grid should actually give a precise inch, or at least 0.01389 above or below it, depending on the positioning on the Artboard).
    You may try the following (you may have tried/done some of them already, and 5) is less likely) and see whether it helps (the following is a general list of things you may try when the issue is not in a specific file; 3) and 4) are specifically aimed at possibly corrupt preferences):
    1) Close down Illy and open again;
    2) Restart the computer (you may do that up to 3 times);
    3) Close down Illy and press Ctrl+Alt+Shift/Cmd+Option+Shift during startup (easy but irreversible);
    4) Move the folder with Illy closed (more tedious but also more thorough and reversible);
    5) Look through and try out the relevant among the Other options (Item 7) is a list of usual suspects among other applications that may disturb and confuse Illy);
    Even more seriously, you may:
    6) Uninstall, run the Cleaner Tool, and reinstall.
    http://www.adobe.com/support/contact/cscleanertool.html

  • How do I lose the box that Keynote draws around the margins of my slides?

    Keynote draws a box around every slide. It's a single line and it defines the margins around the slide. It doesn't show until I print. How do I get rid of it?

    Welcome to the forums!
    If the line is only showing up in printing, then it is a border that is added by default for printing by Keynote. To eliminate it, in the Printing dialog, use the "Copies and Pages" dropdown menu to choose the "Keynote" option, which will give you the Keynote-specific printing options. Uncheck the "Add borders around slides" options. This should fix the issue.

  • HELP!!! Adobe Flash CC pencil and paint brush not drawing properly!!!

    Hi, The paintbrush tool and the pencil tool draw upside down when I am using my graphics tablet, and I know it's not the tablet that's the cause because it works perfectly in paint and photoshop cc, it's just flash cc that has the issue!! how do I sort this?? Please Help!!! I have uploaded a video describing the issue, with the first program showing Flash Pro CC and the second showing Photoshop CC, but basically it's only the pencil and the paintbrush that are affected, the cursor is properly in sync, as you can see by the use of the square and the line tool. Go to 0:50 to see the issue straight away, though try to watch from the start as I demonstrate that the pen works well with other tools in flash cc.
    Please help.
    Thank you.

    Cant offer you much advice but the same thing happens on my tablet.
    It works in paint but it does not even draw in flash.
    But since it does draw in yours why don't you try resetting preferences or exploring your stylus setting in flash for finding the root cause of your problem.
    See if you can post a screenshot of your stylus settings to me if resetting preferences does not work.

Maybe you are looking for