How to make JDialog can't be moved ... ?

Hi, all ...
I'm currently build an application with a Swing. I'm using JDialog right now. Is there anyone know how to make JDialog can't be moved ... ? I want my JDialog stay in center, and nobody can't move it ...
Thanks before ...

Good problem!
If you use the JDK 1.4, there are some method to work for this problem
You should not use the native windows decode title bar, see the
Frame.setUndecorated
JRootPane.setWindowDecorationStyle(JRootPane.FRAME)It seems that you should create a BasicRootPane subclass and implements
your title bar.

Similar Messages

  • How to make JDialog show progress?

    First of all, yes, I used the search function and I know this problem is all over the board, but as so often, the topics I found don't answer my question.
    The Mission: So I want to show my program's user the progress of a function with a progress bar displayed in a custom JDialog along with some other information.
    The Solution?: After hours of searching and trying, I stumpled upon http://www.javareference.com/jrexamples/viewexample.jsp?id=77 , which actually works. Problem is, when I try to build it into my app, it doesn't work anymore.
    The Problem: So what did I do? First, I put the create dialog and perform computation stuff from the example into a function "progressFunction" instead of doing it right away in the main function. Then I wrote a JFrame that has a button. JFrame knows the programs core class with the main function and progressFunction. Clicking on the button calls the progressFunction from the core class. Function gets executed, JDialog shows, but without its contents, namely a progress bar to show the progress of the function.
    The plea for help: As far as I understand, this problem should be solved by putting the execution of the JDialog into a seperate thread, as it is done in the example.
    So, does anyone have a clue why this works directly from the programs main function, but not if I take an indirect approach over user interaction with the gui that calls the function?

    Thanks for your replies.
    I knew already about the tutorial, but I need a custom progress JDialog, JProgressMonitor doesn't fulfill my needs.
    bsampieri, your answer got me to the solution, but not directly. First of all, I already tried invokeLater(), doesn't work for me.
    invokeAndWait() on the other hand can't be called from the EDT, but doing some searching on it got me to the following code: http://www.cs.helsinki.fi/u/vihavain/k03/Java/CoreJavaVolIICh1/ProgressMonitorTestjava.html
    which solves my problem. I guess the trick here is the timer that monitors the actual activity. Seems the timer can force the gui to update, while my custom Thread can't.
    CU
    FLo

  • How to make the smallest increment when moving an object

    Hello all.
    I'm working in a file zoomed fully to 6400%. I've changed the Keyboard increment to the smallest it will allow to 0.0036 mm.
    I have two lines. Line 2 sits on line 1, a fraction above. When I select line 2 and press the down arrow key, it jumps so that line 2 is now a fraction below line one. I cannot get the lines to sit perfectly onto of one another.
    I have tried to move the line using the mouse, but it snaps to the same position as the keyboard press.
    I have turn off snap to grid, snap to point, all the guides, smart guides.
    Has anybody come across this problem? Any boady know how to fix this?
    Kind regards
    James

    thomo,
    You should be able to snap if you use Smart Guides (alone) and move Line 2 with the mouse/stylus.

  • How to make-Data Can't be Chagd-cell look disabled/protected IP BExAnalyzer

    Hi All,
    We have an IP application that need to be built in BEx Analyzer as a workbook.
    In the input ready query there are certain rows and columns / certain cells that are configured for 'Data Cannot be Changed' in the 'Planning' tab properties.
    The query when executed in web, it does show the cells greyed out and disabled so that the user is immediately aware that he should not and cannot enter data in those cells.
    The same thing when executed in BEx analyzer does not give the same feature. How to achieve the same thing or similar thing in BEx Analyzer application for cells that are configured for 'Data cannot be changed'?
    In workbooks for IP queries, I see a different color border and also the data does not stay when written in the 'Data cnnot be changed' cells and saved. But is there a better way to do this and we have to use BEx workbooks only and we cannot go to web due to some policies of the company.
    Thanks in advance,
    - Shashi

    Mayank,
    In the execution mode of the workbook, I went to format-->style of the cells that I wanted to protect and changed the pattern to inlcude a grey color and made it protected.
    Now, the cells look greyed out. That's good but at the same time checking 'Protection' did not do anything. Also, where do I go to set the password?
    6 points awarded.
    Thanks,
    - Shashi

  • Flash cs3: how to make moving/scrolling photo menu left and right?

    http://media.moma.org/subsites/2008/miro/flashsite/index.html
    - click continue, then relative size link
    How can I do this with lash cs3: how to make moving/scrolling
    photo menu left and right?
    When you move left and right and paintings move. and when you
    click on a painting, you see the the title and it links to another
    page on the site.

    scene_mc start at x = -550... x wide is 2164 px
    now I have this and its working...
    navL_mc.addEventListener(MouseEvent.MOUSE_OVER, navL_Over);
    navL_mc.addEventListener(MouseEvent.MOUSE_OUT, navL_Out);
    function navL_Over(e:MouseEvent){
              if(scena_mc.x == 0){
                                  scena_mc.x == 0;
              else if(scena_mc.x <= -10){
                                  scena_mc.x += 10;
                                  navL_mc.addEventListener(Event.ENTER_FRAME, runL);
    function runL(e:Event):void{
              if(scena_mc.x == 0){
                                  scena_mc.x == 0;
              else if(scena_mc.x <= -10){
                                  scena_mc.x += 10;
    function navL_Out(e:MouseEvent){
              navL_mc.removeEventListener(Event.ENTER_FRAME, runL);
    navR_mc.addEventListener(MouseEvent.MOUSE_OVER, navR_Over);
    navR_mc.addEventListener(MouseEvent.MOUSE_OUT, navR_Out);
    function navR_Over(e:MouseEvent){
              if(scena_mc.x == -1164){
                                  scena_mc.x == -1164;
              else if(scena_mc.x >= -1154){
                                  scena_mc.x -= 10;
                                  navR_mc.addEventListener(Event.ENTER_FRAME, runR);
    function runR(e:Event):void{
              if(scena_mc.x == -1164){
                                  scena_mc.x == -1164;
              else if(scena_mc.x >= -1154){
                                  scena_mc.x -= 10;
    function navR_Out(e:MouseEvent){
              navR_mc.removeEventListener(Event.ENTER_FRAME, runR);

  • JDialog Problem: How to make a simple "About" dialog box?

    Hi, anyone can try me out the problem, how to make a simple "About" dialog box? I try to click on the MenuBar item, then request it display a JDialog, how? Following is my example code, what wrong code inside?
    ** Main.java**
    ============================
    publc class Main extends JFrame{
    public Main() {
              super();
              setJMenuBar();
              initialize();
    public void setJMenuBar()
         JMenuBar menubar = new JMenuBar();
            setJMenuBar(menubar);
            JMenu menu1 = new JMenu("File");      
            JMenuItem item = new JMenuItem("About");      
            item.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent ae) {
                  // About about = new About(this);
               // about.show();
            menu1.add(item);
         menubar.add(menu1);
    public static void main(String args[]){
         Main main = new Main();
    }** About.java**
    =============================
    import java.awt.*;
    import javax.swing.*;
    public class About extends JDialog{
         JPanel jp_top, jp_center, jp_bottom;
         public About(JFrame owner){
              super(owner);
              setDefaultCloseOperation( DISPOSE_ON_CLOSE );
              Image img = Toolkit.getDefaultToolkit().getImage(DateChooser.class.getResource("Duke.gif"));          
              setIconImage( img );
              setSize(500,800);
              Container contentPane = getContentPane();
             contentPane.setLayout(new BorderLayout());           
             contentPane.add(getTop(), BorderLayout.NORTH);
              contentPane.add(getCenter(), BorderLayout.CENTER);
              contentPane.add(getBottom(), BorderLayout.SOUTH);
              setResizable(false);
               pack();            
               setVisible(true);
         public JPanel getTop(){
              jp_top = new JPanel();
              return jp_top;
         public JPanel getCenter(){
              jp_center = new JPanel();
              return jp_center;
         public JPanel getBottom(){
              jp_bottom = new JPanel();
              jp_bottom.setLayout(new BoxLayout(jp_bottom, BoxLayout.X_AXIS));
              JButton jb = new JButton("OK");
              jp_bottom.add(jb);
              return jp_bottom;
    }

    Code looks reasonable except
    a) the code in the actionPerformed is commment out
    b) the owner of the dialog should be the frame
    If you need further help then you need to create a "Short, Self Contained, Compilable and Executable, Example Program (SSCCE)",
    see http://homepage1.nifty.com/algafield/sscce.html,
    that demonstrates the incorrect behaviour, because I can't guess exactly what you are doing based on the information provided.

  • Hello Anybody, I have a question. Can any of you please suggest me how to make an xml file from the database table with all the rows? Note:- I am having the XSD Schema file and the resulted XML file should be in that XSD format only.

    Hello Anybody, I have a question. Can any of you please suggest me how to make an xml file from the database table with all the records?
    Note:- I am having the XSD Schema file and the resulted XML file should be in that XSD format only.

    The Oracle documentation has a good overview of the options available
    Generating XML Data from the Database
    Without knowing your version, I just picked 11.2, so you made need to look for that chapter in the documentation for your version to find applicable information.
    You can also find some information in XML DB FAQ

  • My ipad mini is totally drain and after plug it to regain the power its not working anymore.can somebody knows how to make my ipad work again

    my ipad mini is totally drain and after plug it to regain the power its not working anymore.can somebody knows how to make my ipad work again

    Reset iPad
    Hold down the Sleep/Wake button and the Home button at the same time for at least ten seconds, until the Apple logo appears
    Note: Data will not be affected.

  • Can 3 vertical Radio Buttons span 3 rows in a table? AND how to make form highlight when radio butto

    I am trying to add 3 grouped vertical radio buttons where one is on each line of a 3 row table. When I group the 3 buttons it squeezes them into one row, is there a way I can have them grouped and one in each.
    Also, I would like to know how to make part of the form highlight when one of the 3 buttons is selected

    Hi,
    If I am not wrong, a table cell can hold only one component or none. In order to place the radio group to different positions vertically, you can use subforms instead of table.
    Asiye

  • I'm a school tech coordinator. Many computers and many iPads. How many Apple IDs can I have per device, and how many devices can have the same Apple ID? To make my life easier, I'd like 200 devices to all use the same Apple ID.

    I'm a school tech coordinator. I have many computers and many iPads. I apologize if there is a some place that has all the rules governing the use of Apple IDs. I looked, and I even tried to get the answers from multiple Apple rep's. I couldn't find the answers.
    How many Apple IDs can I have per device?
    I want to use the same computer to sync and backup many iOS devices. The iOS devices would be associated with different Apple IDs.
    I may load apps under a school Apple ID and have users load their own apps under thier own ID.
    How many devices can have the same Apple ID?
    Can I use the same Apple ID on all the computers in a lab?
    Can I use the same Apple ID on all iPads for a particular grade level?
    Are the rules different for iOS devices and computers?
    I know that there are limits on "authorize" and "de-authorize" and how frequently those things can be done.
    Recently I heard that for the life of an iOS device, it can only be associated with five Apple IDs. That is not good for a school giving iPads to students in a 1:1
    To make my life easier, I'd like 200 devices to all use the same Apple ID.

    iTunes Store Support
    http://www.apple.com/emea/support/itunes/contact.html
    It would be best to address your questions there, especially since this is a public forum, and over there you could post more private issues with this set-up. Not to mention, getting more official answers.

  • HT201493 How can I add my daughter to Find my friends when we have the same itunes account and that's how they make us log in?

    How can I add my daughter to Find my friends when we have the same itunes account and that's how they make us log in?

    1) You asked "Does she need to reconnect to that itunes/computer and if so what do we need to do to remove this folder of pics from her ipod?" Yes, you have to connect the iPod to that computer and go to the Photos pane for the iPod in iTunes and uncheck sync photos and the click on synce/apply. In the future do not check sync photos.
    iOS and iPod: Syncing photos using iTunes
    2)
    Create a NEW account for using these instructions. Make sure you follow the instructions. Many do not and if you do not you will not get the None option. You must use an email address that you have not used with Apple before.
    Creating an iTunes Store, App Store, iBookstore, and Mac App Store account without a credit card
    Then on the iPod go to
    - Settings>Messages>Send and receive and sign out your ID and sign into hers. Make sure that only her ID email address is listed.
    - Settings>FaceTime sign out of your ID and sign into hers. Make sure that under You can be reached at only her ID email address is listed
    - Settings>iCloud and sign out and sign in with hers
    Contnue to use the commpn ID/account for Settings>iTunes and App stores.

  • Can't figure out how to make "sub-tabs" / Too many "top-tabs" / Other ?

    First of all, the website that I am webmaster for is: www.cindydennis.org .
    I am having some problems:
    1) There are TOO MANY tabs at the top. I can't figure out how to make sub-headings on one page...
    For example, I'd like on the "About CDM" page, tabs that can be clicked on to go to other information tabs, but that don't end up appearing on the top (e.g.: having "Remarks" and "What We Believe" tabs go there, but not appear at the top).
    Another example, if you look at the home screen, I'd like to have the link to the "Privacy Policy" and Terms of Service" pages on the bottom, but not have them appear as tabs in the top, too.
    How do I do this, please? I've searched, and can't figure out/___sbsstatic___/migration-images/migration-img-not-avail.png
    2) How do I add "Copyright 2011" automatically? I saw in the Rapidweaver trial version, it automatically adds it when you publish... is there a way to tell this program to do this? Or do I need to type that in on each page? (I don't want to purchase RW... I'm not ready for that yet.)
    Thank you in advance
    Cindee

    Cindee ~ One way to do the copyright notice is to use a Text Clipping — Select (highlight) the copyright text you want to use and drag it to the Desktop. If necessary, change the name of the Clipping icon so that it's more easily identifiable on the Desktop. Then, when you need it in iWeb, simply drag the Clipping icon from the Desktop to iWeb's main canvas.
    By the way, rather than posting your URL here like this:
    www.cindydennis.org
    ...include the prefix to make it conveniently clickable:
    http://www.cindydennis.org

  • How can I script moving paths from one file to another?

    Hello. I have 1 image with various color correction layers. The other is the exact same size but only contains paths. How can I script moving paths from one file to another? Thanks, in advance, for any help you can offer. Thanks!

    Thanks! This one actually worked for me. Thanks for your help.
    http://forums.adobe.com/message/3305389#3305389

  • I have an iPhone application already developed and it works great ,now i need to make that same application for my iPad .can someone please tell me step by step instructions on how to make it .

    i have an iPhone application already developed and it works great ,now i need to make that same application for my iPad .can someone please tell me step by step instructions on how to make it .

    Try the developer's forum:
    https://discussions.apple.com/community/developer_forums

  • Can someone tell me how to make my screen full size with Safari ?  I am using a Mac osx 10.6.8.

    Can someone tell me how to make my screen full size on my Mac OSX 10.6.8. using safari.  I know this is a simple question. I have always had it on full screen and recently had it worked on remotely and now I can't get the screen back to full size.  I appreciate any advise you can offer. Thank you

    from the BetterTouchTool blog, older versions can be obtained using these links:
    The last 64bit Snow Leopard (10.6 ) version (v 0.939 ) can be downloaded here
    <http://bettertouchtool.net/btt0.939.zip>
    If you are using an older 32bit Mac you’ll have to use this version: 0.785
    <http://bettertouchtool.net/btt0.785.zip>

Maybe you are looking for

  • "message could not be delivered"

    MAILER-DAEMON are replying that message can not be delivered when sendin to my mac addresses!? this started last night. I'm sorry to have to inform you that your message could not be delivered to one or more recipients. It's attached below. For furth

  • Some HTML Emails Do Not Display Properly

    Recently, some HTML emails do not display properly in Mail. All I see is HTML. Yet, 98% of my HTML emails render properly. Any thoughts on why this happens with some emails? Is it a Mail issue or are these emails not coded properly?

  • Serious problem with my 3720 classic! NEED HELP!

    Hi! Today I switched on my pnone and after a while it rebooted. After that reboot, its rebooting after a couple o minutes again and again and again. Yesterday it was just fine! i have about 8000+ messages, but I cant back them up with ovi suite or no

  • Iphoto wont tranfer pictures from iphone

    I cant transfer pictures from my iphone to iphoto because i get an error message saying "Error downloading image. iPhoto cannot import your photos because there was a problem downloading an image"

  • Recommendations for Bluetooth GPS for N95

    Has anyone got any recommendations for a Bluetooth GPS receiver (to improve the dire performance of the inbuilt one) available in UK?