Help with JFrames:Two JFrames dont paint properly

Hello Guys.I am new here and I would like to ask for some help.
I have a problem with me Java application.
My main Class is the MainGUI class which has some selection components and is a JFrame.When the user presses the "proceed" button, it will make a Calculation.class Object to make some calculations.When these are completed, the Calculation class will create a ResultsWindow.class Object which is a new JFrame. The two JFrames (this if type MainGUI and the one of type ResultsWindow) coexist;however they do not show their components properly.What is going on?Can u help me? I am posting some example code:
public class MainGUI extends JFrame implements ActionListener{
public MainGUI() {}
public void actionPerformed(ActionEvent e){
if (e.getSource() == proceedButton) {
Calculator calculatorObj=new Calculator();
if (radioGZIP.isSelected() && radioNone.isSelected()) {
calculatorObj.applyCalculations("NONE","GZIP",filesTableToProcess,targetFolder);}
public static void main(String[] args) {
MainGUI start =new MainGUI();
public class Calculator{
public void applyCalculations(String technique,String algorithm,final String[] filesTable,String targetFolder) {
ResultsWindow resultsWindowObj=new ResultsWindow(technique,algorithm,filesTable,resultTable,resultNCD);
public class ResultsWindow extends JFrame implements ActionListener{
public ResultsWindow(String technique,String algorithm,String[] filesTable,String[][] resultTable,double[] resultNCD) { ...}
I think this is a thread problem...what should I do?The window should repaint everytime I maximize, but it does not...The two JFrames seem to be blocking each other!Help me plz...

Then, my second stab in the dark is:
You don't call revalidate() or validate() on some of their containers after
adding components.
Post the relevant parts of your code or small example code that can reproduce the problem.
See: http://www.physci.org/codes/sscce.jsp

Similar Messages

  • I need help with controlling two .swf's from third.

    Hi, thanks for reading!
    I need help with controlling two .swf's from third.
    I have a problem where I need to use a corporate designed
    .swf in a digital signage solution, but have been told by the legal
    department that it can not be modified in any way, I also can't
    have the source file yada yada. I pulled the .swfs from their
    website and I decompiled them to see what I was up against.
    The main swf that I need to control is HCIC.swf and the
    problem is it starts w/ a preloader, which after loading stops on a
    frame that requires user input (button press) on a play button,
    before the movie will proceed and play through.
    What I have done so far is to create a container swf,
    HCIC_container.swf that will act as Target for the HCIC.swf, and
    allow me to send actionscript to the file I'm not allowed to
    modify.
    I managed to get that done with the help of someone on
    another forum. It was my hope that the following script would just
    start HCIC.swf at a frame past the preloader and play button, and
    just play through.
    var container:MovieClip = createEmptyMovieClip("container",
    getNextHighestDepth());
    var mcLoader:MovieClipLoader = new MovieClipLoader();
    mcLoader.addListener(this);
    mcLoader.loadClip("MCIC.swf", container);
    function onLoadInit(mc:MovieClip) {
    mc.gotoAndPlay(14);
    But unfortunately it didn't solve my problem. Because there
    is a media-controller.swf, that is being loaded by HCIC.swf that
    has the controls including the play button to start HCIC.swf.
    Here's a link to a .zip file with all 3 .swf files, and all 3
    .fla files.
    http://www.axiscc.com/temp/HCIC.zip
    What I need to do is automatically start the HCIC.swf file
    bypassing the pre-loader and play button without editing it or the
    media-controller.swf in anyway. So all the scripting needs to be
    done in HCIC_container.swf.
    I know this is confusing, and its difficult to explain, but
    if you look at the files it should make sense.
    ActionScripting is far from my strong point, so I'm
    definitely over my head here.
    Thanks for your help.

    Got my solution on another forum.
    http://www.actionscript.org/forums/showthread.php3?t=146827

  • I need help with these two crash IDs nsStyleContext::FindChildWithRules(nsIAtom const*, nsRuleNode*) and DFusionWebPlugin@0x86b5

    I need help with these two crashes...
    PL_DHashTableOperate | GCGraphBuilder::NoteRoot(unsigned int, void*, nsCycleCollectionParticipant*)
    DFusionWebPlugin@0x86b5
    The first one happened a couple of days ago, a few times and not on any specific website.
    The second one only happens on the site below.

    The second one indicates a problem with the DFusionWebPlugin that shows in your More system details list.
    # D'Fusion Web Plug-In for Safari 64 bits (3.00.13774.0)
    # D'Fusion Web Plug-In (3.00.13774.0)
    What you posted are crash signatures.<br />
    It might help if you post the actual crash IDs (bp-xxxxxxxx-xxxxxxxxx-xxxx-xxxxxxxxxxxx).<br />
    You can find the IDs of the submitted crash reports on the <i>about:crashes</i> page.
    See http://kb.mozillazine.org/Breakpad (Mozilla Crash Reporter)

  • HT1349 How do I get help with Itunes when I dont have a serial number for a Mac because I am not using a Mac???????

    I just want to get some help using itunes.  I have downladed music - paid for music, and can't get it into itunes.  When I used th e'support' thing it just wanted to know my Mac serial numbers!!  I don't have a Mac I hace a standard non Mac PC.  So why can't I get help with itunes?  Its taken me half an hour to get into this support thing because every single name I chose was taken!!!!  Its just a nightmare.  I hate it!
    And now it tells me I must 'choose a community' and itunes isn;t listed!  It gets worse!  So I chose any community because this is just a never ending nightmare.  40 minutes ago now I clicked on support for itunes and I ended up here!

    Thanks again.  I bought two albums.  I've no idea what I use to open a zip file.  I just tell it to open and it ususally does but this time Windows media player won't do it!
    I am in the UK and its 23.43 so I have to give up and go to bed now.  As I said I have had no probes with Amazon downloads.  I did email CD baby for help but they just sent the links that you offered earlier.
    I have tried to burn to CD so I can listen that way but though I go through all the motions I can't add the tracks to the burn list by copying and pasting, and I can't 'drag the tracks here' beacuse the tracks aren't showing, just the whole album folder.  It looks like this:
    SO02294360-catherinefeeny12-mp3 (1).zip
    file:///C:/Users/User/Downloads/SO02294360-catherinefeeny12-mp3.zip
    Show in folderRemove from list
    Have to give up for today and go to bed but your responses are very much appreciated.  Thank you

  • Help with Merging Two Accounts....

    Hi,
    We ended up with two my Best Buy accounts.
    I called up and talked with someone, who said they would merge the accounts....
    A few hours later, when I logged in, the website said I had two accounts and to choose one to view.
    That lasted for about 4 days,
    Then, the website didn't ask anymore and just logged into one account ... which I thought meant the merge had occured.
    HOWEVER, none of the purchases on the"other" account are on the primary account, which was the point of te

    Hi scXenon,
    I used the email address you registered with the forum to review your information, and I do see that you currently have two active My Best Buy™ accounts.  If the primary information shared between the two accounts matches, then we should have no problem merging them.  That process would involve closing one account, and then moving any unused points/certificates from the closed account to the active primary account.
    I do see that you have an open case with our Account Maintenance department and I trust that they will be able to help successfully merge your accounts; however, I am going to send you a private message to see if there is anything I can help with.  To check your private messages, you would want to login to the forum and click on the yellow envelope icon located at the top of the page.
    Merging My Best Buy™ Accounts
    Thank you for posting!
    Derek|Social Media Specialist | Best Buy® Corporate
     Private Message

  • Help with implementing two different programs

    I need help with a couple of Java programs that I downloaded. I hope someone can help me. They work great if they're on their own, but if they are both on the same page, the 2nd one works, and the 1st one stops working. I'm pretty new to Java, so I don't know how to debug it too well.. Here's the 1st program:
    Conveyor belt slideshow script-
    ? Dynamic Drive (www.dynamicdrive.com)
    For full source code, 100's more DHTML scripts, and Terms Of Use, visit dynamicdrive.com
    //Specify the slider's width (in pixels)
    var sliderwidth="250px"
    //Specify the slider's height
    var sliderheight="19px"
    //Specify the slider's slide speed (larger is faster 1-10)
    var slidespeed=2
    //configure background color:
    slidebgcolor=""
    //Specify the slider's images
    var leftrightslide=new Array()
    var finalslide=''
    leftrightslide[0]='<img src="images/movingwords.gif">'
    ////NO NEED TO EDIT BELOW THIS LINE////////////
    var copyspeed=slidespeed
    leftrightslide='<nobr>'+leftrightslide.join(" ")+'</nobr>'
    var iedom=document.all||document.getElementById
    if (iedom)
    //Next line edited for readability
    document.write('<span id="temp" style="visibility:hidden;position:absolute;top:-100px;left:-9000px">
    '+leftrightslide+'</span>')
    var actualwidth=''
    var cross_slide, ns_slide
    function fillup(){
    if (iedom){
    cross_slide=document.getElementById? document.getElementById("test2") : document.all.test2
    cross_slide2=document.getElementById? document.getElementById("test3") : document.all.test3
    cross_slide.innerHTML=cross_slide2.innerHTML=leftrightslide
    actualwidth=document.all? cross_slide.offsetWidth : document.getElementById("temp").offsetWidth
    cross_slide2.style.left=actualwidth+20+"px"
    else if (document.layers){
    ns_slide=document.ns_slidemenu.document.ns_slidemenu2
    ns_slide2=document.ns_slidemenu.document.ns_slidemenu3
    ns_slide.document.write(leftrightslide)
    ns_slide.document.close()
    actualwidth=ns_slide.document.width
    ns_slide2.left=actualwidth+20
    ns_slide2.document.write(leftrightslide)
    ns_slide2.document.close()
    lefttime=setInterval("slideleft()",30)
    window.onload=fillup
    function slideleft(){
    if (iedom){
    if (parseInt(cross_slide.style.left)>(actualwidth*(-1)+8))
    cross_slide.style.left=parseInt(cross_slide.style.left)-copyspeed+"px"
    else
    cross_slide.style.left=parseInt(cross_slide2.style.left)+actualwidth+30+"px"
    if (parseInt(cross_slide2.style.left)>(actualwidth*(-1)+8))
    cross_slide2.style.left=parseInt(cross_slide2.style.left)-copyspeed+"px"
    else
    cross_slide2.style.left=parseInt(cross_slide.style.left)+actualwidth+30+"px"
    else if (document.layers){
    if (ns_slide.left>(actualwidth*(-1)+8))
    ns_slide.left-=copyspeed
    else
    ns_slide.left=ns_slide2.left+actualwidth+30
    if (ns_slide2.left>(actualwidth*(-1)+8))
    ns_slide2.left-=copyspeed
    else
    ns_slide2.left=ns_slide.left+actualwidth+30
    if (iedom||document.layers){
    with (document){
    document.write('<table border="0" cellspacing="0" cellpadding="0"><td>')
    if (iedom){
    write('<div style="position:relative;width:'+sliderwidth+';height:'+sliderheight+';overflow:hidden">')
    //Next line edited for readability
    write('<div style="position:absolute;width:'+sliderwidth+';height:'+sliderheight+';
    background-color:'+slidebgcolor+'" onMouseover="copyspeed=0" onMouseout="copyspeed=slidespeed">')
    write('<div id="test2" style="position:absolute;left:0px;top:0px"></div>')
    write('<div id="test3" style="position:absolute;left:-1000px;top:0px"></div>')
    write('</div></div>')
    else if (document.layers){
    write('<ilayer width='+sliderwidth+' height='+sliderheight+' name="ns_slidemenu" bgColor='+slidebgcolor+'>')
    write('<layer name="ns_slidemenu2" left=0 top=0 onMouseover="copyspeed=0" onMouseout="copyspeed=slidespeed"></layer>')
    write('<layer name="ns_slidemenu3" left=0 top=0 onMouseover="copyspeed=0" onMouseout="copyspeed=slidespeed"></layer>')
    write('</ilayer>')
    document.write('</td></table>')
    }Here's the 2nd program:
    //Fade-in image slideshow- By Dynamic Drive
    //For full source code and more DHTML scripts, visit http://www.dynamicdrive.com
    //This credit MUST stay intact for use
    var slideshow_width='305px' //SET IMAGE WIDTH
    var slideshow_height='152px' //SET IMAGE HEIGHT
    var pause=5000 //SET PAUSE BETWEEN SLIDE (3000=3 seconds)
    var fadeimages=new Array()
    //SET IMAGE PATHS. Extend or contract array as needed
    fadeimages[0]="images/Computer Retail Store.jpg"
    fadeimages[1]="images/Computer S&S ad.jpg"
    fadeimages[2]="images/Computer S&S ad 2.jpg"
    fadeimages[3]="images/Phone S&S ad.jpg"
    ////NO need to edit beyond here/////////////
    var preloadedimages=new Array()
    for (p=0;p<fadeimages.length;p++){
    preloadedimages[p]=new Image()
    preloadedimages[p].src=fadeimages[p]
    var ie4=document.all
    var dom=document.getElementById
    if (ie4||dom)
    //Next line edited for readability
    document.write('<div style="position:relative;width:'+slideshow_width+';height:'+slideshow_height+';overflow:hidden">
    <div  id="canvas0" style="position:absolute;width:'+slideshow_width+';height:'+slideshow_height+';top:0;left:0;filter:
    alpha(opacity=10);-moz-opacity:10"></div><div id="canvas1" style="position:absolute;width:'+slideshow_width+';
    height:'+slideshow_height+';top:0;left:0;filter:
    alpha(opacity=10);-moz-opacity:10"></div></div>')
    else
    document.write('<img name="defaultslide" src="'+fadeimages[0]+'">')
    var curpos=10
    var degree=10
    var curcanvas="canvas0"
    var curimageindex=0
    var nextimageindex=1
    function fadepic(){
    if (curpos<100){
    curpos+=10
    if (tempobj.filters)
    tempobj.filters.alpha.opacity=curpos
    else if (tempobj.style.MozOpacity)
    tempobj.style.MozOpacity=curpos/100
    else{
    clearInterval(dropslide)
    nextcanvas=(curcanvas=="canvas0")? "canvas0" : "canvas1"
    tempobj=ie4? eval("document.all."+nextcanvas) : document.getElementById(nextcanvas)
    tempobj.innerHTML='<img src="'+fadeimages[nextimageindex]+'">'
    nextimageindex=(nextimageindex<fadeimages.length-1)? nextimageindex+1 : 0
    setTimeout("rotateimage()",pause)
    function rotateimage(){
    if (ie4||dom){
    resetit(curcanvas)
    var crossobj=tempobj=ie4? eval("document.all."+curcanvas) : document.getElementById(curcanvas)
    crossobj.style.zIndex++
    var temp='setInterval("fadepic()",50)'
    dropslide=eval(temp)
    curcanvas=(curcanvas=="canvas0")? "canvas1" : "canvas0"
    else
    document.images.defaultslide.src=fadeimages[curimageindex]
    curimageindex=(curimageindex<fadeimages.length-1)? curimageindex+1 : 0
    function resetit(what){
    curpos=10
    var crossobj=ie4? eval("document.all."+what) : document.getElementById(what)
    if (crossobj.filters)
    crossobj.filters.alpha.opacity=curpos
    else if (crossobj.style.MozOpacity)
    crossobj.style.MozOpacity=curpos/100
    function startit(){
    var crossobj=ie4? eval("document.all."+curcanvas) : document.getElementById(curcanvas)
    crossobj.innerHTML='<img src="'+fadeimages[curimageindex]+'">'
    rotateimage()
    if (ie4||dom)
    window.onload=startit
    else
    setInterval("rotateimage()",pause)Like I said, if the 2nd program is put the same page with the 1st, the 1st program stops working. Any ideas? I would really like to implement both of these programs.

    The code you post is javascript, NOT java ! ... but either way, maybe the scripts have variables in conflict, so if you pack each piece of code in diferent functions and then you call the functions it may work.

  • Need a little help with JFrame

    I have looked all over the net for my answer but guess i am just not putting two and two together.
    I want to be able and edit the size of this JFrame but can not figure out how to set the default size and i know it is something simple but just a little over my head as i am a newb. I appreciate any help offered.
    class Browser extends JFrame {
         private JButton button;
         public Browser() {
              button = new JButton("Open Browser");
              this.getContentPane().add(button);
              this.pack();
              this.setSize(500, 600);
              this.setLocationRelativeTo(null);
              this.setDefaultCloseOperation(EXIT_ON_CLOSE);
              this.setTitle("Browser Demo");
    Thanks again for your help.

    iheartgeeks wrote:
    I would suggest using GridBagLayout - this will allow you to specify the position of your components in the frame.As do all layout managers, to some degree.
    As Michael_Dunn said, you're using two sizing methods which are, I suspect, giving you undesirable results. Delete the pack and see what happens. Delete the set size and see what happens. If you need further assistance, trying being more specific about the expected results, desired results and actual results.Good try, but not quite there.
    Swing has a couple ways to specify component sizes:
    PreferredSize -- This is the size some layout managers (pretty much anything but Grid) use to determine a default starting size when computing your layout. Most components will calculate this for you without you doing anything.
    MinimumSize & MaximumSize -- Self explanatory
    Size -- The current size of the component. This will be probably be wiped out when any layout managers start messing around with your frame
    the .pack() call is actually more important than you think. It will compute the smallest container size that allows your components to be sized to at least their preferredSize. Note that this must be done before making the frame visible
    So in short, when setting up a Swing layout
    1) If you're using GridLayout, don't bother setting PreferredSize, everything gets the same size; otherwise, don't set PreferredSize explicitly until you need to.
    2) Call frame.pack() before frame.setVisible()
    3) Run your gui and see what happens. At this point, if any components need to have their PreferredSize set, do it now.

  • Need help with doing two things at once

    hey all!
    i'm trying to write a program where the user has twenty seconds to guess the houshold item. every five seconds the pc gives a clue, if the user manages to guess it in time, they win! else...
    anyway, my compiler comes up with nothing but when i execute it and press "go" to start the process, the program does what it is meant to exept for at the end where it always displays "you lose" regardless of anything that has happened.i'm not sure what i'm doing wrong.
    here's the code:
    import java.util.Random;
    import javax.swing.event.DocumentListener;
    import javax.swing.event.DocumentEvent;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.*;
    import java.awt.event.*;
    import java.awt.FlowLayout;
    import static java.lang.System.out;
    import java.util.Timer;
    import java.util.TimerTask;
    class Quiz extends JFrame implements ActionListener, ItemListener{
         public static void main(String args[]){
              new Quiz();
         String qp;
         int duh = 1;
         int funnum = 0;
         Timer othertime = new Timer();
         JLabel ql1 = new JLabel();
         JLabel ql2 = new JLabel();
         JLabel ql3 = new JLabel();
         JLabel ql4 = new JLabel();
         JLabel ql5 = new JLabel();
         JLabel ql6 = new JLabel();
         JLabel timelabel = new JLabel();
        JButton qlb1 = new JButton("go");
        JComboBox box = new JComboBox();
         public Quiz(){
         setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         setLayout(new FlowLayout());
         add(ql1);
         ql1.setVisible(false);
         add(ql2);
         ql2.setVisible(false);
         add(ql3);
         ql3.setVisible(false);
         add(ql4);
         ql4.setVisible(false);
         add(ql5);
         ql5.setVisible(false);
         add(ql6);
         add(timelabel);
         add(qlb1);
         qlb1.addActionListener(this);
         add(box);
         box.addItem("");
         box.addItem("shower");
         box.addItem("bed");
         box.addItem("spade");
         box.addItem("knife");
         box.addItem("book");
         box.addItem("rake");
         box.addItem("bookshelf");
         box.addItem("sink");
         box.addItem("bedside lamp");
         box.addItem("wooden spoon");
         box.addItem("'quiet' sign");
         box.addItem("baking tray");
         box.addItem("desk");
         box.addItem("toilet");
         box.addItem("compost");
         box.addItem("pillow");
         box.addItem("blanket");
         box.addItem("pan");
         box.addItem("study computer");
         box.addItem("tap");
         box.addItem("bookworms");
         box.addItem("duvey");
         box.addItem("bath");
         box.addItem("plants");
         box.addItem("cooker");
         box.addItem("trampoline");
         box.addItemListener(this);
         box.setEnabled(false);
         pack();
         setVisible(true);     
         public void actionPerformed(ActionEvent e){
         qlb1.setEnabled(false);
         int rndmnm = new Random().nextInt(10)+1;
         final int getnum = rndmnm;
         switch(getnum){
         case 1:
         ql1.setText("this is a kitchen item");
         ql2.setText("it is used for cooking");
         ql3.setText("it requires heat");
         ql4.setText("it needs greasy paper");
         qp = "baking tray";
         break;
         case 2:
             ql1.setText("this is a kitchen item");
             ql2.setText("this item has no food put into it to cook");
             ql3.setText("this item does not require heat");
             ql4.setText("it is used for mixing ingredients");
             qp = "wooden spoon";
            break;
           case 3:
             ql1.setText("this is a bathroom item");
             ql2.setText("it is used when washing");
             ql3.setText("it does not create foam");
             ql4.setText("it can be relaxing");
             qp = "bath";
                break;
                case 4:
                ql1.setText("this is a bathroom item");
                ql2.setText("it squirts water");
                ql3.setText("it is stationary");
                ql4.setText("temperature does not matter");
                qp = "toilet";
                break;
                case 5:
                ql1.setText("this is a bedroom item");
                ql2.setText("it is slept on top of");
                ql3.setText("all except the head sleeps on top of it");
                ql4.setText("it is not hard");
                qp = "duvey";
                break;
                case 6:
                ql1.setText("this is a bedroom item");
                ql2.setText("it is not hard");
                ql3.setText("legs generally never lie on top of it");
                ql4.setText("it is nearly as long as the duve");
                qp = "blanket";
                break;
                case 7:
                ql1.setText("this is a library item");
                ql2.setText("it is of great use");
                ql3.setText("it is material");
                ql4.setText("it stores much data");
                qp = "bookshelf";
                break;
                case 8:
                ql1.setText("this is a library item");
                ql2.setText("it is simple to use");
                ql3.setText("you do not nead to search much to find it");
                ql4.setText("it is not made of wood or other carpentry material");
                qp = "'quiet' sign";
                break;
                case 9:
                ql1.setText("this is a garden item");
                ql2.setText("it covers area");
                ql3.setText("it can crush plants...");
                ql4.setText("...but is also very useful to them");
                qp = "compost";
                break;
                default:
                ql1.setText("this is a garden item");
                ql2.setText("it requires heavy work to do");
                ql3.setText("and good looking after");
                ql4.setText("the outcome is surprisingly delicate");
                qp = "plants";
                break;
         othertime.scheduleAtFixedRate(new TimerTask() {
                   int otherval = 0;
                   public void run() {
                        switch (otherval)
                             case 1:
                             timelabel.setText("20");
                                  ql5.setText(qp);
                                  ql1.setVisible(true);
                                  box.setEnabled(true);
                                  break;
                             case 2:
                                 timelabel.setText("19");
                                 break;
                                      case 3:
                                 timelabel.setText("18");
                                 break;
                                      case 4:
                                 timelabel.setText("17");
                                 break;
                             case 5:
                                  timelabel.setText("16");
                                  ql2.setVisible(true);
                                  break;
                                       case 6:
                                 timelabel.setText("15");
                                 break;
                                      case 7:
                                 timelabel.setText("14");
                                 break;
                                      case 8:
                                 timelabel.setText("13");
                                 break;
                                      case 9:
                                 timelabel.setText("12");
                                 break;
                             case 10:
                                 timelabel.setText("11");
                                  ql3.setVisible(true);
                                  break;
                                       case 11:
                                 timelabel.setText("10");
                                 break;
                                      case 12:
                                 timelabel.setText("9");
                                 break;
                                      case 13:
                                 timelabel.setText("8");
                                 break;
                                      case 14:
                                 timelabel.setText("7");
                                 break;
                             case 15:
                             timelabel.setText("6");
                                  ql4.setVisible(true);
                                  break;
                                       case 16:
                                 timelabel.setText("5");
                                 break;
                                      case 17:
                                 timelabel.setText("4");
                                 break;
                                      case 18:
                                 timelabel.setText("3");
                                 break;
                                      case 19:
                                 timelabel.setText("2");
                                 break;
                             case 20:
                                 timelabel.setText("1");
                                 break;
                             case 21:
                                 timelabel.setText("");
                                 duh --;
                             if(duh == 1){
                             ql6.setText("you win!!!");     
                             } else {
                             ql6.setText("you lose");
                                  break;
                        otherval++;
                   } }, 1000, 1000);
           public void itemStateChanged(ItemEvent e){
                        box.setEnabled(false);
                        if(box.getSelectedItem() == ql5.getText()){
                        duh ++;
                        } else {
                      funnum ++;
      }as i say, the ending will always be "you lose".
    anyhoo, for those of you who want a question its "what am i doing wrong that prevents the user from winning?"
    thankyou for your help (if you do help).

    the point of the decremation is that duh is incremented if you get the answer right,
    public void itemStateChanged(ItemEvent e){
                        box.setEnabled(false);
                        if(box.getSelectedItem() == ql5.getText()){
                        duh ++;
                        } else {
                      funnum ++;
                   } and then duh is decremented, like so:
         case 21:
                                 timelabel.setText("");
                                 duh --;
                             if(duh == 1){
                             ql6.setText("you win!!!");     
                             } else {
                             ql6.setText("you lose");
                                  break;the point is that if the user gets it right, duh should be incremented, then in the switch statements decrements the value of duh. so if the user got it right, duh should equal 1. else duh will be decreased to zero
    hope that makes it more clear (i'm not very good with explaining stuff)

  • Please help with combining two java packages into one iteration

    Hello, I work for a pharmaceutical company and run reports for credits that we have received. Currently the packages are reported seperately from the credit reports and my job is to combine them. There are two models that handle these and I need to link the second to the first with some common entities. Please help me figure out what I need to do in order to add a credit column to the report. I have a sample of the code below and would appreciate any help you can offer.
    First, the info pulled about the boxes:
    rm = (ReportManager) ManagerFactory.getManager(ManagerFactory.REPORTS);
    items = rm.getRVSSearchResults(hvstoresid,
    hvstoregroupsid,
    String.valueOf(request.getParameter("price_type")).trim(),
    String.valueOf(report_by).trim(),
    vendor_type,
    String.valueOf(request.getParameter("vendor")).trim(),
    from_date,
                        until_date,
    debitNum,
                        processing_type,
    sort_field,
    sort_direction,
                        includeAll222s).iterator();
    Second, the page that has the data i need to transpose to the first:
    PackoutModel pm = null;
                             int iter = searchpageposition*resultPageSize;
                             while (iter < packouts.size() && iter<(searchpageposition*resultPageSize)+resultPageSize)
                             { pm = (PackoutModel) packouts.get(iter);
                                  BigDecimal invoiceAmt = DataConverter.parseBigDecimalWithAlternateWhenNull(pm.getInvoiceAmt(),"0.00");
                                  BigDecimal creditRec = DataConverter.parseBigDecimalWithAlternateWhenNull(pm.getAmtReceived(),"0.00");
                                  BigDecimal processingFee = DataConverter.parseBigDecimalWithAlternateWhenNull(pm.getProcessFeeTotal(),"0.00");
                                  BigDecimal shippingFee = DataConverter.parseBigDecimalWithAlternateWhenNull(pm.getShippingHandlingFeeTotal(),"0.00");
                                  BigDecimal balanceDue =(invoiceAmt.add(processingFee.add(shippingFee))).subtract(creditRec);
    All that I need from the second page is to get a value for:
    DataConverter.parseBigDecimalWithAlternateWhenNull(pm.getAmtReceived(),"0.00");
    which I believe must first have the store id, etc equal to the first model. So there is the existing rvs.FOO and the needed pm.BAR but since it is in an iter loop, I can't seem to figure out how to join the two.
    Any ideas?

    could you explain your problem with a simplified schema or a more
    understandable code.
    (don't bother to write the details of your project plz)

  • Help with Sub-catalog CSS not rendering properly

    I am having a issue with  deep Sub-catalogs not displaying an external style sheet, possibly being overwritten by modulestylesheet?
    Sorry if it looks a little sloppy, the site is still a work in progress...
    If you look here at this main catalog : http://www.4plotters.com/shop/   --------- >the css is being applied properly,
    the next level down here : http://www.4plotters.com/shop/Toner-Ink  --------------> css also applied properly.
    but... when you go one more level deep   here : http://www.4plotters.com/shop/Toner-Ink/ink-wide-format  -----> css is not being applied from my external css (much of its functionality is to overwrite the modulestyle sheet) Notice the link colors change to blue, and the catalog images and headers don't match the catalogs before it.
    I have some other external twitter bootstrap css files that are still being applied, so I am a little confused. I am fairly new to css and html (and self taught) so I might be just missing some fundamental precedence rules.
    Thanks in advance!
    *Edit* When I change the parent catalog to the top level "Shop" catalog, the css is once again applied properly. It is something about being 2 or 3 levels deep that breaks the css link.

    Hi,
    Go into your template and remove the ".." prior to the CSS reference to help correct this issue. 
    Before:
    After:
    Hope this helps!
    -Sidney

  • Help with Joining two SharePoint lists using LINQ

    Hi Guys,
    I have found many threads with this question. Although I had one doubt. I wanted to know that while performing a Join operation on two SharePoint Lists using LINQ does the column on which we are performing the join operation need to be a Lookup column?
    I was initially using CAML but since my lists does not contain lookup columns I switched to LINQ but my doubt still remains.
    I would really appreciate any help from you guys and also would appreciate if I could get some examples that I could refer to.
    Thank you

    Joins in LINQ to SharePoint 2010
    How to: Query Using LINQ to SharePoint
    This post is my own opinion and does not necessarily reflect the opinion or view of Slalom.

  • Help with these two loops

    Hi I hope someone can help me?
    I have these two loops, which at the moment prints out like this
    addr1, id, phone, lastname, firstname
    town, addr2, postcode, county, country
    [7,4,2,1,0]
    [9,8,6,5,3]
    the first two lines is what vector vv2 holds inside it.
    the second two line is what vector vv holds inside it.
    my problem is how can i get it to printout like this?
    [7,4,2,1,0]
    addr1, id, phone, lastname, firstname
    [9,8,6,5,3]
    town, addr2, postcode, county, country
    I hope someone can help me thanks
    nicky
    for (int ii2=0;ii2 < results2.size(); ii2++) {
                    vv2 = (Vector)results2.elementAt(ii2);     
                          ste2 = vv2.toString();
                             stb2 = new StringBuffer(ste2);
                             stb12 = new StringBuffer();
                             int is = stb2.length();
                             int is2 = is-2;
                             int is3 = is-1;
                             stb2.replace(0,1,"");
                             stb2.replace(is2,is3,"");
                             for(int i222 = 0; i222 < vv2.size(); i222++){
                                  stb12.append(",");
                                  stb12.append("?");
                                  stb12.replace(0,1,"");
                                  System.out.println(stb2);
    for (int ii = 0; ii < results.size(); ii++) {
        vv = (Vector)results.get(ii);
    System.out.println(vv);
    }

    You are using more for loops than you need to. If you just want to print out the element of one vector after the other then just put it in the same loop. Here try this:
    for (int ii2=0;ii2 < results2.size(); ii2++) {
                    vv2 = (Vector)results2.elementAt(ii2);     
                          ste2 = vv2.toString();
                             stb2 = new StringBuffer(ste2);
                             stb12 = new StringBuffer();
                             int is = stb2.length();
                             int is2 = is-2;
                             int is3 = is-1;
                             stb2.replace(0,1,"");
                             stb2.replace(is2,is3,"");
                             for(int i222 = 0; i222 < vv2.size(); i222++){
                                  stb12.append(",");
                                  stb12.append("?");
                                  stb12.replace(0,1,"");
                                  System.out.println(stb2);
         vv = (Vector)results.get(ii2);
         System.out.println(vv);
          And for god sakes man use some better names for your for loop iterator. Usually it is custom to start with i and if you need an inner for loop or another for loop within the same scope move on to using j and then k, so on and so on. All those numbers in your variables make the code harder to read than it needs to be. Just a suggestion, good luck.

  • Need Help With Combining Two Variables For A Redirect

    Hello-
    <br />
    <br />In a different part of my site (built with ADDT) I have this script that creates a variable by combining two session variables, and then the new variable is submitted into a mysqul database table using a hidden form field:
    <br />
    <br />
    <form>
    <input type="hidden" name="exerreference" id="exerreference" value="<?php echo $_SESSION['kt_login_user']; ?><?php echo $_SESSION['kt_exer_reference']; ?> <br />" />
    <br />
    <br />There is also this part of the script in the header script:
    <br />
    <br />$ins_exer1-&gt;addColumn("exerreference", "STRING_TYPE", "POST", "exerreference");
    <br />
    <br />What I am trying to do now on another page is combine a session variable "kt_login_user" with a piece of dynamic text "AA" so that I can compare it to the field "exerreference" that was inserted into the database using the above script. If the two variables match, the idea is to have a redirect to another page.
    <br />
    <br />So in a hypothetical example, if the value of the session variable "kt_login_user " is "bestperson," and static text is "AA" then I need to create the variable bestpersonAA (because this is how the variables exist in the exerreference recordset). This variable bestpersonAA then needs to be compared to the recordset value exerreference and if they match, the page redirects to ../previous/portalpre.php. If the two variables do not match, then there is no redirect.
    <br />
    <br />Here is what I have so far:
    <br />
    <br />if (isset($_SESSION['kt_login_user']))
    <br />{
    <br />if ($_SESSION['kt_login_user'.'AA'] = $row_Recordsetexer1['exerreference'])
    <br />{
    <br /> header ("Location: ../previous/portalpre.php");
    <br />}
    <br />}
    <br />
    <br />The script doesn't work yet - it's redirecting regardless of if the two varibles match. Any ideas on the correct syntax to get this working correctly?
    <br />
    <br />Thanks
    <br />Dale</form>

    Hi Dale,
    if ($_SESSION['kt_login_user'.'AA'] = $row_Recordsetexer1['exerreference'])
    for checking whether two variables match, you´ll need the == comparison operator:
    if ($_SESSION['kt_login_user'.'AA'] == $row_Recordsetexer1['exerreference'])
    Cheers,
    Günter Schenk
    Adobe Community Expert, Dreamweaver

  • Help with using two computers for iPod

    So, as the title hints to, I use two different computers for my day to day activities and have now run into a big hiccup.
    -I have, currently on my iPod about 475 songs. All were painstakingly loaded from their CD's onto the little devil. I did this at work in spare time (OK maybe not, but that's not wehat we're here about)
    -Today I tried connecting to load some new songs, from my home machine, onto the iPod and it says it will erase all of my previous work.
    -I did some browsing here and discovered things like Pod Soft or whatever but could none of those programs to work for me. I also attempted the shift/ctrl trick which failed as well.
    -Am I hooped? Do I just face facts and use only one machine for this? What happens when I trade a computer? Actually, in the meantime I am not worried about that, I just want my new tunes on the iPod. I am feeling quite limited by this and understood it would be a much easier process.
    Thanks for looking in on this and any advice given.

    This might also be of interest:
    Managing Songs Manually
    I hope this helps!

  • I need help with combining two pdf files together but it won't let me in the latest Acrobat DC?

    Hi,
    I had two ai files, 11 by 17 on separate pages, and made them into pdf's. When I combine the files, it will let one out of the two files go through. The funny thing is that it will let the larger file go through than the smaller file. The file that went through had been in  ai, dropped it into photoshop and put it back into ai again. The file that won't go through is a quote with different text. What should I do? What does pdf/a, pdf/x, pdf/e and preflight mean?
    Thank you

    Make sure neither of the PDF have been secured in some manner like password protection, form rights or forms distribution.
    Forms created with live cycle cannot be combined by Acrobat.

Maybe you are looking for

  • Cannot deploy VM from VMM and AppController

     Hi All, I have been installing the VMM and AppController. Initially all went well. After I install RU5 there occurs a problem where I can not deploy vm of VMM and AppController with error messages like that : host A kuilab01 on kuilab01 still availa

  • How can i put my videos on the ipod classic

    how can i put my videos on the ipod classic

  • Transfering music from old computer to a new one

    Hi, I was wondering if someone can help me, i recently bought a new laptop, but my old one has my itunes on it. i have tried a few times to add it to my new itunes, but everytime i do, the music is in, but then if i switch my comp off and then go to

  • Middleware settings to map CRM Z table fields with ECC material master flds

    Hi, We want to create  a Z table in CRM,this table willl have 2 fields External Material Group and Old Material Number.These 2 fields in CRM table are corresponding to same material master (MM03) fields in ECC.The changes to these fields done in ECC

  • Address Book's Large Groups

    I need to create a very large group on Address Book (sync'd with iCloud). Now I've reached 1792 entries and it's impossible to add even a single entry more. Did i reach a limit of entries that the Address Book's groups support?? Thanks for reply!