Two frames open

hi, i have got a problem with a program i am developing, i have got a JFrame and one of the buttons opens up another JFrame. the problem i am having is that the second window does not open properly. The panel shows but all the information on it is absent. I have tried setting the visibility status of the first frame to false when the second one opens, but this does not work. Does anyone have any ideas?

i am basically tyring to run a rabbit fox simulation but with a gui that when you click start is opens to field. I dont want to display all the source code from the original rabbit fox as it is quite alot, but you can find it here:
http://www.cs.luc.edu/~pld/courses/170/spr06/lab10/foxrabbit.zip.
Below is the GUI code i add
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
public class simGUI extends JFrame implements ActionListener {
JButton start = new JButton("start");
JPanel pane;
public simGUI(){
super("test");
setSize(50,50);
pane = new JPanel();
start.addActionListener(this);
pane.add(start);
setVisible(true);
     setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          this.setContentPane(pane);
          show();
     public void actionPerformed(ActionEvent evt)
          Object src = evt.getSource();
          if (src == start){
          Simulator sim = new Simulator();
          sim.runLongSimulation();
with out this code, the sim rums, but when i use the gui to start the sim, the field does not display until the end of the simulation. Any suggestions why?

Similar Messages

  • Frames open in a new window

    Hello there!
    I am trying to do a homepage in dreamweaver. It is working
    well just in Safari. Frames open in a new window on other browsers
    and it is not what I want. I haven't linked anything to _blank. Can
    anybody help me?
    Dental V6

    What? Each page is complete in itself. That's the thing you
    are missing.
    In that case, you do not need both page1 and page2 open at
    the same time.
    I assume you are imagining page1 as something like masthead
    and navigation,
    and page2 as content. But that's not the best way to do it.
    Page1 and
    page2 would both contain masthead and navigation and content.
    They would be
    independent pages that are both complete.
    The way to do this would be to use -
    1. DW templates to provide easy-to-maintain 'boilerplate'
    elements on all
    pages, or
    2. Server-side includes to allow the use of separate
    'component' page
    fragments which are automatically included into each page by
    the server.
    You just do not want to use frames.
    The decision to use or not use frames should be based on a)
    your site's
    needs, and b) your willingness to accept the potential
    problems that frames
    can create for you as developer and maintainer of the site
    and for your
    visitors as casual users of the site.
    I am down on frames because I believe that they create many
    more problems
    than they solve.
    Judging from the posts here, and the kinds of problems that
    are described,
    the kind of person most likely to elect to use frames is also
    the kind of
    person most likely ill-prepared fo solve the ensuing problems
    when they
    arise. If you feel a) that you understand the problems and b)
    that you are
    prepared to handle them when they occur, and c) that you have
    a need to use
    frames, then by all means use them.
    As far as I know, the most comprehensive discussions of
    frames and their
    potential problems can be found on these two links -
    http://apptools.com/rants/framesevil.php
    http://www.tjkdesign.com/articles/frames/
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "Dentalv6" <[email protected]> wrote in
    message
    news:[email protected]...
    > But I want page2 opens beside page1. In this case I need
    frames, right?
    >

  • Link to a frame opens up in a new window

    I'm making a website with two frames: the top one contains the menu and the bottom one shows the content. I read the description in the help page, that as target you should write the name of the frame you want the link to open up in. I did that but it opens up in a new window anyway. Why is this?
    The name of the frameset is called "index" and the top frame is called "menyrad". The start page and the bottom frame are the same thing, it's called "start". Should these be two separate things instead? But then wouldn't the bottom frame be empty when one goes to the page for the first time? Anyway, I have made only one other page so far, it's called "hyr_personal". In the links that are on the top frame, I have written "start.html" or "hyr_personal.html" as the link and "start.html" as the target. This is all the code I have so far:
    <!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>Jourbemanning</title>
    </head>
    <body background="moln.png">
    <a href="start.html" accesskey="S" target="start.html">Start</a>
    <a href="hyr_personal.html" accesskey="H" target="start.html">Hyr personal</a>
    </body>
    </html>
    If there's anything else you need to know, just tell me. I haven't published the page yet. I saw that someone else had a thread about the same subject, but their code didn't look even remotely the same.

    Hi Zefyrinus,
    from the point I understood correctly, that what I see is the relating to the appearance like described here:
    http://help.adobe.com/en_US/dreamweaver/cs/using/WScbb6b82af5544594822510a94ae8d65-7d2da.h tml
    In the Target menu in the Property inspector, select the frame or window in which the linked document should appear:
    _blank opens the linked document in a new browser window, leaving the current window untouched.
    _parent opens the linked document in the parent frameset of the frame the link appears in, replacing the entire frameset.
    _self opens the link in the current frame, replacing the content in that frame.
    _top opens the linked document in the current browser window, replacing all frames.
    Frame names also appear in this menu. Select a named frame to open the linked document in that frame.
    That means not a file is a target:
    <a href="start.html" accesskey="S" target="start.html">Start</a>
    <a href="hyr_personal.html" accesskey="H" target="start.html">Hyr personal</a>
    but rather the appearance, what means for example:
    <a href="start.html" accesskey="S" target="_blank">Start</a>
    <a href="hyr_personal.html" accesskey="H" target="_blank">Hyr personal</a>
    Hans-G.

  • How to display Two frames in HTML....

    Hi,
    Can someone please advice me on how to display two frams on one page without using FrameSet...
    Thanks,

    Hi,
    Thank you for your reply...
    I already have something that i did in Applet but i don't want to use Applet....
    The problem with frameset is that i will be adding documents Types Dynamically in HTML List and after clicking the Document Type I want to display Image depending on what Document Type is clicked...
    Both the DOCUMENT TYPE and IMAGE, I want to create DYnamically. I don't want to create Two HTML Files (one for Image and One for LIST) and then open it from Another HTML Which contains FrameSets...
    I hope you get my point....
    Is there any other ways i can do this....
    Any help will be greatly appreciated...

  • How do I go directly from one frame to another particular frame which is far away in the time line? (e.g the two frames are separated by 100 frames)

    How do I go directly from one frame to another particular frame which is far away in the time line? (e.g the two frames are separated by 100 frames). I mean, is it possible to take the playhead from one frame to another frame directly which is 100 frames away in the time line? Thanks for any reply.

    In the Timeline, go to the first frame and press M to put a marker on it. Go to the other frame you want to jump to and put a marker on that one too.
    Now press Ctrl+Semicolon to go to the previous marker - or Ctrl+Comma to go to the next marker.
    Andy

  • Can I have two projects open on Premiere Elements at the same time? (Elements 13 for Windows)

    Hi there.
    Can I have two projects open on Premiere Elements at the same time?
    The reason I wanna do this is because I've trimmed many hours of clips in one project (One timeline) and I want to start a new project where I have a "clean" timeline and can add clips from the
    first project (Cut and paste). Or how do I bring a trimmed clip from one project into another in a easy way?
    Thanks
    -Dan-

    Your question is in the Photoshop Elements forum.  There is another forum for Premier Elements and this will probably be moved.
    That said, the answer is that Premier Elements has not be designed with the ability to cut and paste from one project to another.  The only "work around" is to "Publish&Share" to a best quality format that matches your project settings.  You can control the output clips with the "work area bars".  You can then add the new clip to the second project.   The output rendering process can, at least in theory, reduce the picture quality.  Depending on formats, settings and footage, it may not be noticeable.
    There is a third party product called Clipmate that some say works, but not always with good results. 

  • Can two frames use the same SessionInfo object?

    Hi,
    I have some questions on using InfoBus Frame.
    Do parent frame and child frame HAVE TO make use the same
    SessionInfo object?
    I tried to show Master table and Detailed table in seperate
    frame without login twice. I am lucky it works since I happened
    to make two frames have the same SessionInfo object which is
    sessionInfo1 and conmment out sessionInfo1.publishSession()in
    Detailed frame.
    But when I tried to pass Master frame SessionInfo object to
    Detailed frame there is nothing showing up in the detailed frame
    it is just blank frame.
    So two frames have to use the same SessionInfo object . Dose it
    make sense?
    I would really appreciate anyone who can enlighten me on this
    subject.
    Thanks you so much for the attention.
    Julie Chi
    null

    Gopal (guest) wrote:
    : HI,
    : Julie Chi (guest) wrote:
    : : So two frames have to use the same SessionInfo object . Dose
    it
    : : make sense?
    : Yes, if you are working with a master details relation, data
    for
    : both need to be fetched from the same oracle session. So both
    ur
    : frames need to refer the same session. If u refer the detail
    : frame to a different session, u will not see any data, because
    : the information comes from a different oracle session which is
    : not aware of the master data that is fetched. I think it is
    : clear.
    : regards,
    : --Gopal
    1.Use wizard and test the frame
    2.pass the sessioninfo object in parent to child(put method in
    child, call from parent e.g ..getsessionInfo(SessionInfo ss)
    3.pass the sessioninfo object to rowsetinfo in child
    4.add Database authentication (username/password is sufficient)
    methods right before publish method
    *publish activates RowSetInfo and connects to db
    5.add methods in parent to call child
    That should work though depending on how you have set up your
    wizard generated java form, might tweak
    Thanks
    iggy de iguana
    null

  • Is there any way to have two garagebands open at the same time?

    I'm remixing a NIN song, and I need to have two garagebands open at the same time, is this possible? If so, please help!!

    it is possible, but you'd be on your own if there's a prob, and you can't copy and paste between them if that's what you're trying to do

  • I'm trying to redownload my music onto a new computer and its not working..I think I may have two accounts open because the one im signed into is empty and I cant remember my log in info..and when I reset it it doesnt help.

    I got a new lap top and I was trying to re download my music to the new one and it's not working. I think I may have to accounts open because its saying mine hasnt been active in a while and I know thats not true...and there is no music in the library it's all empty...is it possible to have two accounts open? if so how do I cancel one. and keep the other....

    You need to ask Apple to reset your security questions. To do this, click here and pick a method; if that page doesn't list one for your country or you're unable to call, fill out and submit this form.
    (122986)

  • I am having problems copying and pasting clips from one project timeline to another. When I do this they often alter in length. Sometimes by two frames. Other times they lose a chunk off the end of the last clip in the sequence. Has anyone else found

    I am having problems copying and pasting clips from one project timeline to another. When I do this they often alter in length. Sometimes by two frames. Other times they lose a chunk off the end of the last clip in the sequence. Has anyone else found this?

    You need to give a lot more information about the media specifications and the project properties you're using in the different projects.

  • Two windows open when I open Firefox. I just upgraded to 6.0.2

    I just upgraded to 6.0.2. Now two windows open each time (your firefox is updated). There is also a lag becasue it is checking ad ons. I tried deleting prefs.js. I also reinstalled Firefox. Nothing works. Very frustrating

    Could it be something else besides apps, that's downloading, but not finishing? Like a movie, or book?
    I got Toy Story those two little movies from 12 days and the other one is not downloading.
    If thats the issue, pause the movie download, so it will download your apps.
    Palmondo

  • Freezes whenever loading videos or two tabs open at once

    if i have two tabs open at once, and try to watch a video it freezes up, or the screen at least. sometimes the video sound keeps playing but the window in frozen.
    I have the new version of firefox, which i just downloaded.

    See this article for some suggestions: [[Firefox has just updated tab shows each time you start Firefox]]
    See also http://kb.mozillazine.org/Preferences_not_saved and [[Preferences are not saved]]
    [[How to set the home page]]: Firefox supports multiple home pages separated by '|' symbols.

  • Firefox freezes for up to a minute when I have two tabs open and running a video and a flash game. Why?

    Firefox freezes for up to a minute when I have two tabs open, one playing a YouTube video, the other with a flash game running, and the screen shows the contents of both tabs, one superimposed on the other. If I have other tabs open, they also appear as visual garbage on the same screen. After the freeze, everything semi-works, starting and stopping, with long frozen hangs.The frequency of this problem is increasing and greatly reduces Firefox's operating capacity. I am using Firefox 5.0 on a Windows Vista desktop made by Hewlett-Packard. I have cleared the caches and the problem persists, and I can't find any online help to explain why this is happening. I don't recall it happening with a previous version of Firefox.

    Hello jesterabk, '''Try Firefox Safe Mode''' to see if the problem goes away. Safe Mode is a troubleshooting mode, which disables most add-ons.
    ''(If you're not using it, switch to the Default theme.)''
    * You can open Firefox 4.0+ in Safe Mode by holding the '''Shift''' key when you open the Firefox desktop or Start menu shortcut.
    * Or open the Help menu and click on the '''Restart with Add-ons Disabled...''' menu item while Firefox is running.
    ''Once you get the pop-up, just select "'Start in Safe Mode"''
    '''''If the issue is not present in Firefox Safe Mode''''', your problem is probably caused by an extension, and you need to figure out which one. Please follow the [[Troubleshooting extensions and themes]] article for that.
    ''To exit the Firefox Safe Mode, just close Firefox and wait a few seconds before opening Firefox for normal use again.''
    ''When you figure out what's causing your issues, please let us know. It might help other users who have the same problem.''
    Thank you.

  • How to push the two pdf opened documents in the array?

    Hi all,
    I need to store the two pdf opened documents in the array value(i.e array(0), array(1)) and then get that array value one by one, and print it through AVAlertNote(). Kindly advise me the possiblities and solution.
    Thanks for looking into this.

    What do you mean you want to put the "pdf open documents" in an array?  You mean the PDDoc structures?  Just use a std::vector<> or the like.
    And what did you want to print?
    If you are trying to debug, why not use the source debugger for your platform?

  • How to set the HOME link from two frame jsp page to no frame main page?

    Hi all,
    i have one main jsp page named as main.jsp.
    From the main.jsp, i can click the button and link to the twoFrame.jsp.
    This twoFrame.jsp have another two different jsp inside the frame called Aframe.jsp and Bframe.jsp.
    i try to put HOME in the Aframe.jsp(one of the page inside twoFrame.jsp) but only the Aframe.jsp manage to link to main.jsp but the Bframe still there.
    My question is: How to set the HOME link button from this twoFrame.jsp to the main.jsp? what i want is from twoFrame.jsp(two frame) to main.jsp(no frame).
    rgds,
    Bryan523

    No offense, but this is basic HTML. You shuold look into learning HTML before getting too deep into JSP. Try this: http://www.w3schools.com/html/default.asp
    But as a more specific answer, you have to set a target for the link to the _parent of your frame:
    <a href="main.jsp" target="_parent">Home</a>

Maybe you are looking for

  • I don't have the 3d option while using Adobe Photoshop CC

    The title pretty much explains it all, and here is my system info. Adobe Photoshop Version: 14.2.1 (14.2.1 20140207.r.570 2014/02/07:23:00:00) x64 Operating System: Mac OS 10.7.5 System architecture: Intel CPU Family:6, Model:42, Stepping:7 with MMX,

  • Hardware load balancing with session stickiness

    Hello,           We are looking for a hardware based solution to load balance 4           unclustered weblogic servers. These servers are software replicas of           each other and share a common database. We need a solution that           provide

  • Force Outlook to index faster

    Outlook 2010 - fully patched. Is there a way to force Windows/Outlook to use more resources to index quicker? It's painful when you've got several GB mailboxes and PST's and need to perform searches in Outlook. I've got 16GBs, a performance SSD, and

  • Using array with a stored procedure

    Hello, In order to transmit an array from java to a PL/SQL procedure with oracle8i, we have been trying to instanciate an javaArrayDescriptor using the name of an oracle user Datatype (a table of Varchar(20)). This works perfectly well while connecte

  • Using the Aiport Express as a Wireless Access Point on Windows XP

    I would like to use my airport express as a wireless access point so that it will connect wirelessly to my router and via an Ethernet cable to my laptop that does not have a wireless card. Also, I have a laptop that I don't have admin rights to, so I