Making of Modal  frame........

hi,
someone please tell me how to create a modal window/ frame???
I'm new to java also I want to know what is the basic difference between JSDK & J2EE???

Somitesh wrote:
someone please tell me how to create a modal window/ frame???Frames as top-level containers can't be modal. A JWindow (you wouldn't want to learn AWT) takes a parent frame as constructor argument to which it'll be modal to.
I'm new to java also I want to know what is the basic difference between JSDK & J2EE???JEE is an extension, a specification of technologies for enterprise-grade applications.

Similar Messages

  • How to make a modal frame?

    Hello!
    My problem is quite simple, but I don't know how to make some MODAL frames (JFrame I mean). In my application, the user can open a same frame even if this frame is already opened and that's not really good.
    So, I want the user to close the frame before opening another one.
    Can anyone explain me how to do that?

    Generally your actionListener will be an internal class of your main frame class. Usually an anonymous internal class. That means it can act on variables in the frame (which is the sensible place to keep the flags).
    Something like:
    class Class1 extends JDesktop {
    boolean itsOpen = false;
    openAction.setActionListener(new ActionListener(){
      public void actionPerformed(ActionEvent e) {
        if(!itsOpen) {
           itsOpen = true;
           openAction.setEnabled(false);
           MyInternalFrame newFrame = new MyInternalFrame(Class1.this, ....);
           add(newFrame);
       });You do need some way for the internal frame to act on the variables in the main frame. There are various ways of achieving this.
    If we're dealing with a genuine InternalFrame there's a special InternalFrameListener (?) which allows your main frame to listen for the window closing. You can use this instead of hacking the dispose method.
    If you're main frame is a JDeskTop then you can use getDesktop() in your internal frame to access it, then cast the result to the real class of your desktop.
    Our you can simply add a pointer to your class1 to the contructor of your internal frame class.
    You could even get clever and create your own listener system.

  • How to make an internal frame a modal frame?

    aoa Friends i am trying to make a application using jframe with jdesktoppane and jinternal frame.is there any body who can guide me through that :
    how to make a jinternal frame a modal frame so that if a new jinternalform is opened than the previous one could not be accessed and if new one is closed then we can use that form.

    http://developer.java.sun.com/developer/JDCTechTips/2001/tt1220.html
    This is the example I used approach 2 to simulate a model frame.
    rykk

  • Modal frames : how ?

    Hi there,
    I'm developing an application using the MDI interface so I'm using JInternalFrames.
    So basically I have an initial splash screen that tries
    to connect to the database and if it succeeds, the
    "complete" mdi is shown to the user.
    But if the server is down, I'd like to show a frame
    with an error message to let the user know the
    server is down. I created a JInternalFrame that is
    supposed to appear right after the application finds out
    the server is down but I can't make it get the focus
    and stay on the screen as a modal frame.
    It shows itself but disappears (goes to the background) as the main window
    builds it's toolbars and menus and stuff.
    How can I do that so that this frame gets all the user's
    attention ?
    Thanks a lot,
    Wagner

    this.addWindowListener(new java.awt.event.WindowAdapter() {
                   public void windowDeactivated(WindowEvent e) {
                                  if(bKeepOnTop)//keep this window on top.
                   this.toFront();
              });

  • Modal/Non Modal Frame?

    Hi,
    Any property to set a Frame to Modal/Non Model?
    Thx
    Ali

    I have been working with this a little.
    You need to pass the parent frame into the child frame as a parameter in the constructor and store it in a local variable
    For example:
    Child Frame Constructor:
    // local variable
    InfoFrame parentFrame;
    public ChildFrame(InfoFrame parent)
    parentFrame = parent;
    parentFrame.setEnabled(false);
    The child frame must re-enable the parent frame when closing
    private void closeFrame()
    parentFrame.setEnabled(true);
    dispose();
    This will basically make modal frames.
    Hope this helps.
    The only problem I am having is the parent frame does not rePaint very well when enabled. My menus are not displaying properly.

  • Modal Frame or Dialog with Minimize/Maximize buttons

    I want to create a window (dialog or frame) that is modal and has the minimize/maximize buttons. Is it possible? How?
    I normally would use a dialog if I wanted the window to be modal, but a dialog does not have the minimize/maximize buttons. I normally would use a frame if I wanted the window have the minimize/maximize buttons, but a frame cannot be modal.
    Any suggestions, please?

    You can make your "modal panel" listener the window events from all others frames:
    public class YourModalFrame extends JFrame implements WindowListener{
      public YourModalFrame(JFrame owner){
        super("Modal Frame");
        this.owner = owner;
        // we put a glass panel into the main frame
        JPanel glassPanel = new JPanel();
        glassPanel.setOpaque(false);
        glassPanel.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
        // blocking the events!!!
        glassPanel.addKeyListener        (new KeyAdapter()        {});
        glassPanel.addMouseListener      (new MouseAdapter()      {});
        glassPanel.addMouseMotionListener(new MouseMotionAdapter(){});
        owner.setGlassPane(glassPanel);
        // the frame will listener owner windows events
        owner.addWindowListener(this);
      // Window Listener  //
       * Invoked the first time a window is made visible.
      public void windowOpened(WindowEvent e){}
       * Invoked when the user attempts to close the window
       * from the window's system menu.  If the program does not
       * explicitly hide or dispose the window while processing
       * this event, the window close operation will be cancelled.
      public void windowClosing(WindowEvent e){}
       * Invoked when a window has been closed as the result
       * of calling dispose on the window.
      public void windowClosed(WindowEvent e){}
       * Invoked when a window is changed from a normal to a
       * minimized state. For many platforms, a minimized window
       * is displayed as the icon specified in the window's
       * iconImage property.
       * @see java.awt.Frame#setIconImage
      public void windowIconified(WindowEvent e){
        // Do you want this too?
        //super.setState(JFrame.ICONIFIED);
       * Invoked when a window is changed from a minimized
       * to a normal state.
      public void windowDeiconified(WindowEvent e){
        if(super.getState() == JFrame.ICONIFIED)
          super.setState(JFrame.NORMAL);
        this.requestFocus();
       * Invoked when the window is set to be the user's
       * active window, which means the window (or one of its
       * subcomponents) will receive keyboard events.
      public void windowActivated(WindowEvent e){
        this.requestFocus();
       * Invoked when a window is no longer the user's active
       * window, which means that keyboard events will no longer
       * be delivered to the window or its subcomponents.
      public void windowDeactivated(WindowEvent e){}
    }

  • Help Making Text Picture Frames

    I came across this neat design feature, and I am not too sure how to go about creating this element because I am new to Illustrator. Still, I figure this is either a PS or an Illustrator feature. Whatever the case, how can I go about making text that incorporates picture frames as seen in the words "Road Trip" (and if there are any videos out there that would be great). 

    I think what you are asking is how to make images appear through type.
    If you want to make a single image appear through a word, all you need to do is to position the (live) type on top of the image, select type and image and hit Cmd/Ctrl+7. This makes the type into a clipping mask.
    Alternatively, if you want each letter to contain a separate image, outline the type, ungroup (preferably) and make each letter into a clipping mask over its own image.
    There are other ways but this is the easiest.
    Here are two examples:
    The top one is live type masking a single image.
    The bottom one is outlined type masking two images. In this case you will need to make compound paths, one for each set of letters, WES and TMAN ISLANDS. Each compound path masks its own image.

  • I am making an animation(frames) on Illustration but im having a problem.

    SO Im making the frames for my animation on illustrator - im making 8 frames per artboard. (im gonna have around 450 frames)
    But i have to put each frame in Photoshop - the size of a6 paper (making a flip book too) .
    But its takes so long to put each frame into photoshop and then i have to save it which also takes ages ?????????????
    Is there any fast ways to do this?
    PLease  if  you know a way you will save me soooo sooo soo much time.

    Sorry i did no explain my self.
    I am making a animation (stop-motion with type)
    I am making the frames on illustrator - i make 8 frames on one art board at a time.
    I then takes those frames i made ( each frame is a word blending in to each other) Ie  'Memory' into 'of'  Happy into Sad.  so its takes 8 frames to do that.
    I then copy and paste each frame/word into photoshop so i centre the frame/word so the animation will be more smooth . But there will be aout 500 frames and it takes ages.
    I was wondering is there a faster way to do this.
    I not to familar with Illustrator . rememeber i got 8 frames that have to be saved separtly on illustrator at a time !!!
    Thanks Monika

  • Trouble with making a freeze frame?

    Hello All,
    I need some help with something I'm trying to do.  I have a short clip in my timeline that I have color corrected and added some filters to.  Then I move the playhead around until I find a still picture that I like and then I go to Modify>Make Freeze Frame and then I move the still from the viewer over to the section that hold all the files.  The trouble is that when I make the freeze frame FCE is giving the version before I did color correction or adding the filters.  How do I get to make a freeze frame that has been color corrected?  It's showing me the raw version before I've done anything to it.
    Thanks for your help.
    MIke

    When the freeze frame is created in FCE, it is only from the master clip (with no filters applied).  Simply drag the filters that you applied to the clip to the new freeze frame.  The filters will be applied with the settings you made.
    -DH

  • Making a seperate frame non resizable

    Is it possible to make a seperate frame non-resizable and if so how? If I set the resizable property of the window then this simply makes the browser non-resizable rather than the seperate frame. Is there some PL/SQL code that can do this for me or is it possible to set this in the forms web config? Thanks for any help
    Dan

    I have tried this method, it looks like it should run, but when i compile it the browser displays................
    "Untitled1.java": Error #: 750 : initialization error: com.borland.compiler.symtab.LoadError: neither class nor source found for java.lang.Object
    public class Untitled1 extends Component {
    public void createPanel()
    JFrame frame = new JFrame();
    frame.setUndecorated(true);
    frame.setLayout(new BorderLayout());
    MyDisplay test = new MyDisplay(frame);
    test.setLayout(new BorderLayout());
    frame.add(test, BorderLayout.CENTER);
    JLabel label = new JLabel("This is just a test");
    test.add(label, BorderLayout.CENTER);
    frame.pack();
    frame.setSize(500, 500);
    // make sure you pack and/or set size first...
    Dimension dS = Toolkit.getDefaultToolkit().getScreenSize();
    Dimension dF = frame.getSize();
    // make sure it's not off screen
    int x = (dS.width/2)-(dF.width/2);
    int y = (dS.height/2)-(dF.height/2);
    if(x < 0) x = 0;
    if(y < 0) y = 0;
    frame.setLocation(x, y);
    frame.setVisible(true);
    contentpane.add(sc);
    jscrollpane sc = new jscrollpane();
    jtextarea ta = new jtextarea();
    /**Main method*/
    public static void main(String[] args) {
    try {
    UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
    catch(Exception e) {
    e.printStackTrace();
    new untitled1();
    Do you know how i can correct this erreor!

  • Making a 3D frame for my homepage

    Are there any tutorials for creating a 3D in appearance frame? I want a frame or box on my homepage to appear as though it is 3d or leaping out from the background. As you can tell, I have only just aquired PE7.

    No, I can do that, this is a link to the sort of thing I mean https://www.google.co.uk/search?q=3d+web+page&hl=en&tbo=u&tbm=isch&source=univ&sa=X&ei=Gz4 QUZ7oF4fC0QXWsoDACQ&sqi=2&ved=0CEYQsAQ&biw=1600&bih=787#imgrc=xf1gjSmb6l5ntM%3A%3BAyYI6IbA hPUI-M%3Bhttp%253A%252F%252Fwww.thegraphicmac.com%252Fwp-content%252Fuploads%252Fps-3D-web -page-creator.jpg%3Bhttp%253A%252F%252Fwww.thegraphicmac.com%252F3d-web-page-display-creat or-for-photoshop%3B550%3B452

  • How to make a frame modal?

    Hei guyz,
    I'm trying to call a frame from another frame (which should basically act like a dialog, but is not a dialog), how can i make this 'child' frame modal, i.e. once im done with the 'child' frame, the focus has to go back to the 'parent' frame and no other component could be opened while a user is working on the 'child' frame.
    Can anyone let me know, how this is possible and is there any other better approach (other than making the child frame, a dialog)?
    Thanks in advance.

    and is there any other better approach How can we suggest a better approach when we don't know why you rejected a modal dialog.
    Based on your requirement:
    once im done with the 'child' frame, the focus has to go back to the 'parent' frame and no other component could be opened while a user is working on the 'child' frame.
    it would appear to me that using an modal dialog is the obvious choice.
    Otherwise I suggest you search the forum. Keywords like "modal jframe" would be a good place to start.

  • Time choosers and frames

    ok i 2 questions here.
    1. i am trying to build a date/time chooser similiar to the Windows->control panel->date/time dialog where a user can select a date/time and hit the OK to set the date/time. i found a date chooser online however i have been unsuccessful in finding a time chooser online.
    Do anyone have a combo Date/time chooser they would recommend? or just a time selector they woudl recommend?
    2. i am using the dialog mentioned in question 1 as a selector for filling in a date/time into a JTable. so far i have been using a frame to contain my component however i was wonder if there was a way of making this "modal" meaning the user can't select on another window part of the application until this one is closed. again i'm using a JFrame i don't mind changing it however i do not have the ability to pass around the parent JFrame. i also do not mind changing it from a JFrame to a JDialog or other however i did not have luck getting that to compile.

    PhHein
    appreciate the assist. i must have been doing something wierd because not the dialog works fine and is modal. thank you.
    however if anyone could please let me know of a time or clock selector for setting a time similiar to the windows set time dialog. i would be in very much debt.

  • How to expand all frames in the document using a script?

    Hi,
    I have used the ImageCatalog script to place a 1000+ images of different dimensions in the document. On the ImageCatalog dialog box, I have unchecked the Proportional and Frame to Content option to place the images in 100%. I am looking for a way to expand all the graphic frames to reveal all the images it placed on the document. When you double-click the bottom-right handle, it would expand the frame to see the full content. (it would time consuming when you do this one by one)
    Let me know. Thank you very much.

    If I understand you correctly, you placed the images without using Fit Frame To Contents and now you are trying to rectify this? Do you get that making just the frames larger, at this point, may make them overlapping others? If that's going to be a problem, just run the script again but this time with the correct settings ...
    Anyhow. Typing on my iPad so I can't check; but something in the lines of
    g = app.activeDocument.allGraphics;
    for (i=0; i<g.length; i++)
      g[i].fit (FitOptions.FRAME_TO_CONTENT);
    See http://jongware.mit.edu/idcsjs5.5/pc_Graphic.html#fit

  • Export Quicktime = stalling / frame rate / dropped frames

    Firstly this issue isn't news. It appears it has existed since 2002 at least on these forums and Apple has done nothing.
    Exporting to Quicktime:
    1) Keynote makes up what seem to be consistent random frame rates on export
    - Codec doesn't matter. Photo JPG, Intermediate, 8bit 422, H264
    - You can set the frame rate in export / custom / settings it doesn't matter
    - Having no video on a slide or having video on a slide doesn't change the problem...
    - The last two items do have more information to complete their story
    - If you do have a video on slide at say 25fps and export (at same rate) the random will stabilise
    but it will stabilise to something bizarre, such as 23.69.
    - So Keynote can wreck your frame rate it will drop frames, or even add frames while dropping
    others. It is deeply sophisticated in how it destroys stuff on export.
    Result
    - is a stuttering output if embed video on a slide with a wrecked frame rate
    - and a random frame rate if you don't have a video embed
    2) The video stalls between slides
    - Keynote seems to play a trick by making a single frame span multiple frames
    - At the start of the first slide this seems to vary. The first frame can be between 7 and 33
    frames depending on some strange internal logic only known to Keynote
    - Between slides it will hold the last frame of the exiting slide usually for 7 frames and hold
    the first frame of the entering slide for usually the same amount.
    - No amount of change to settings such as transition delay, adding a transition, self play etc
    will effect this stalling from what I can tell.
    - You can analyse the reality of the issue by dropping the resulting file into Quicktime 7 and
    changing the video window "time code" display to frames by clicking on it and single framing
    through the video. I have Quicktime Pro for the record.
    Notes:
    - I have every update installed and am running 10.6.2
    - I have tried it on two machines, one a clean build, server or client
    - Playing the presentation direct in Keynote does not present any of the noted issues
    - I have spent the better part of two weeks on the issue trying all sorts of combinations
    - Video of different frames rates, sizes, codecs. All useless, don't bother.
    Outcome:
    - Keynote is completely useless unless you just want to play a presentation in it
    - Dropped frames, stuttering video, stalling, mangled frame rates, fake frames
    Solutions that aren't:
    - One suggestion for video embeds is to enter a strange custom frame rate. For example a
    24fps original turns into a 23.69 export, if you up the frame rate to 24.3 the resulting export
    is 24fps.
    This is a truly hit and miss affair and will require a lot of testing to nail it. Unfortunately I
    tested the resulting video frame count in Quicktime against the original video and...
    The amount of frames is not the same. Part of my assumption is that the stalled pad frames
    are being considered by Keynote and it drops some frames to fake the same length, that at
    least -seems- to be part of the result, but it doesn't account for all the lost frames.
    - I have also tried just having one slide and exporting that. The same things happen regardless
    How Al Gore managed to make "inconvenient truth" using Keynote is a complete mystery. Maybe on Tiger with some old version it used to work, yet from the forums it would appear it has never worked. This piece of software is a clear case of "it just doesn't work"
    I hope you find this and stop hurting yourself trying to make this. I might hurt on a bit longer yet.

    I can't answer in detail (I started with version 6, which I haven't used in years, so don't know what v5 did) but... a general comment
    Software that old is very likely going to struggle trying to edit a VOB/MPG file copies from a DVD
    If you are digitizing by playing the DVD through a conversion device you should end up with DV AVI which should edit well
    Just what kind of files are you trying to edit?

Maybe you are looking for