Problem in layout, please help in correcting code

Hello Friends,
I am facing a very strange problem. I have 1 DespktopPane, say DT in which I have created two InternalFrames, say IF1 and IF2. Also there are two JPanels, say P1 and P2. P1 contains various controls and IF1s ContentPane is set to P1 and P2 contains nothing. There two MenuItems, say M1 and M2. On M1s click I displayed IF1 and on M2s click I displayed IF2. Before adding IF2 everything is working fine, i.e. all the controls are able to display on IF1 but after adding IF2 allthe controls are transferred from IF1 to IF2 and now IF1 displays as a blank screen and IF2 contains allthe controls which are added in JPanel p2 whereas IF2s ContenPane is set to P2 and no control is added in P2.
For your reference, here is the code:
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class MDILayout extends JFrame implements ActionListener
    private static JFrame frame = null;
    private static JDesktopPane desktop = null;
    private static JInternalFrame intframe = null;
    private static JInternalFrame rangeframe = null;
    private static JPanel panel = null;
    private static Image img = null;
    private static JMenuBar menubar = null;
    private static JMenu mfile = null;
    private static JMenuItem bexit = null;
    private static JMenuItem borders = null;
    private static JMenuItem boption = null;
    JButton bcancel,bquery,bexecute,bupdate,bnext,bprev;
    JLabel lheader,lheader1,lheader2,lheader3,lline,lline1,
    lodate,lquality,ltype,lparty,lindent,lsize,lmul,lgsm,lquantity,ldest,lorderno;
    JTextField todate,tquality,ttype,tparty,tindent,tlength,twidth,tgsm,tquantity,tdest,torderno;
    JComboBox cbotype;
    Font bigfont,bigfont1;
    static String ltext="",ltext1="",ltext2="",ltext3="";
    Panel p; Graphics g;
    MDILayout()
        frame = new JFrame("Deckle Suite (Board)");
        desktop = new JDesktopPane();
        intframe = new JInternalFrame("Orders",true,true,true,true);          
        rangeframe = new JInternalFrame("Machine - Deckle Range",true,true,true,true);           
        frame.setSize(1024,738);
        frame.setResizable(false);
        intframe.setSize(1000,680);
        rangeframe.setSize(500,350);
        JPanel p1=(JPanel)getContentPane();
        p1.setLayout(null);
        JPanel p2=(JPanel)getContentPane();
        p2.setLayout(null);
        intframe.setContentPane(p1);
        rangeframe.setContentPane(p2);
        frame.setContentPane(desktop);
        desktop.add(intframe);
        desktop.add(rangeframe);
        intframe.setMaximizable(true);
        intframe.setResizable(false);
        rangeframe.setMaximizable(true);
        rangeframe.setResizable(false);
        intframe.setContentPane(p1);
        intframe.setDefaultCloseOperation(HIDE_ON_CLOSE);
        rangeframe.setContentPane(p2);
        rangeframe.setDefaultCloseOperation(HIDE_ON_CLOSE);
        menubar = new JMenuBar();
        mfile = new JMenu("File");
        bexit = new JMenuItem("Exit");
        borders = new JMenuItem("Orders");
        boption=new JMenuItem("Options");
        menubar.add(mfile);
        mfile.add(borders);
        mfile.add(boption);
        mfile.add(bexit);
        frame.setJMenuBar(menubar);
        ltext="==========";
        for(int i=0;i<6;i++)
                ltext1=ltext+ltext1;
                ltext=ltext1;
        ltext2="----------";
        for(int j=0;j<6;j++)
                ltext3=ltext2+ltext3;
                ltext2=ltext3;
        bigfont=new Font("Monotype Corsiva",Font.BOLD,35);
        bigfont1=new Font("Times New Roman",Font.PLAIN,20);
        lheader=new JLabel("Deckle Suite (Board)");
        lheader1=new JLabel("Khanna  Paper  Mill (Pvt.) Ltd.");
        lheader2=new JLabel("Fatehgarh Road");
        lheader3=new JLabel("Amritsar");
        lline=new JLabel(ltext1);
        lline1=new JLabel(ltext3);
        lodate=new JLabel("Order Date");
        lquality=new JLabel("Quality");
        ltype=new JLabel("Sheet/Reel");
        lparty=new JLabel("Party");
        lindent=new JLabel("Indent No.");
        lsize=new JLabel("Size");
        lmul=new JLabel("x");
        lgsm=new JLabel("GSM");
        lquantity=new JLabel("Quantity");
        ldest=new JLabel("Destination");
        lorderno=new JLabel("Line No.");
        todate=new JTextField(50);
        tquality=new JTextField(50);
        ttype=new JTextField(20);
        cbotype=new JComboBox();
        tparty=new JTextField(200);
        tindent=new JTextField(50);
        tlength=new JTextField(35);
        twidth=new JTextField(35);
        tgsm=new JTextField(20);
        tquantity=new JTextField(35);
        tdest=new JTextField(200);
        torderno=new JTextField(200);
        lheader.setBounds(350,50,500,50);
        lheader1.setBounds(370,100,500,30);
        lheader2.setBounds(430,130,200,30);
        lheader3.setBounds(460,160,200,30);
        lline.setBounds(0,200,3000,30);
        lline1.setBounds(0,350,3000,30);
        lorderno.setBounds(40,240,100,20);
        lodate.setBounds(40,270,100,20);
        lquality.setBounds(320,270,100,20);
        ltype.setBounds(40,400,70,20);
        lparty.setBounds(40,300,70,20);
        lindent.setBounds(40,430,100,20);
        lsize.setBounds(450,430,50,20);
        lmul.setBounds(560,430,50,20);
        lgsm.setBounds(40,460,50,20);
        lquantity.setBounds(320,460,50,20);
        ldest.setBounds(40,490,100,20);
        torderno.setBounds(120,240,100,20);
        todate.setBounds(120,270,100,20);
        tquality.setBounds(380,270,200,20);
        cbotype.setBounds(120,400,90,20);
        tparty.setBounds(120,300,700,20);
        tindent.setBounds(120,430,200,20);
        tlength.setBounds(490,430,60,20);
        twidth.setBounds(580,430,60,20);
        tgsm.setBounds(120,460,80,20);
        tquantity.setBounds(380,460,80,20);
        tdest.setBounds(120,490,500,20);
        cbotype.addItem("SHEET");
        cbotype.addItem("REEL");
        p1.add(lheader);
        p1.add(lheader1);
        p1.add(lheader2);
        p1.add(lheader3);
        p1.add(lline);
        p1.add(lline1);
        p1.add(lodate);
        p1.add(todate);
        p1.add(lquality);
        p1.add(tquality);
        p1.add(lparty);
        p1.add(tparty);
        p1.add(ltype);
        p1.add(cbotype);
        p1.add(lindent);
        p1.add(tindent);
        p1.add(lsize);
        p1.add(tlength);
        p1.add(lmul);
        p1.add(twidth);
        p1.add(lgsm);
        p1.add(tgsm);
        p1.add(lquantity);
        p1.add(tquantity);
        p1.add(ldest);
        p1.add(tdest);
        p1.add(lorderno);
        p1.add(torderno);
        lheader.setFont(bigfont);
        lheader1.setFont(bigfont1);
        lheader2.setFont(bigfont1);
        lheader3.setFont(bigfont1);
        lheader.setForeground(Color.blue);
        lheader1.setForeground(Color.gray);
        lheader2.setForeground(Color.gray);
        lheader3.setForeground(Color.gray);
        bcancel=new JButton("Refresh");
        bquery=new JButton("Query");
        bexecute=new JButton("Execute");
        bupdate=new JButton("Update");
        bnext=new JButton("Next");
        bprev=new JButton("Previous");
        bcancel.addActionListener(this);
        bquery.addActionListener(this);
        bexecute.addActionListener(this);
        bupdate.addActionListener(this);
        bnext.addActionListener(this);
        bprev.addActionListener(this);
        borders.addActionListener(this);
        boption.addActionListener(this);;
        bexit.addActionListener(this);
        bcancel.setBounds(250,550,200,25);
        p1.add(bcancel);
        bquery.setBounds(450,550,200,25);
        p1.add(bquery);
        bexecute.setBounds(650,550,200,25);
        p1.add(bexecute);
        bupdate.setBounds(250,575,200,25);
        p1.add(bupdate);
        bprev.setBounds(450,575,200,25);
        p1.add(bprev);
        bnext.setBounds(650,575,200,25);
        p1.add(bnext);
        torderno.setEnabled(false);
        todate.setEnabled(false);
        bcancel.setEnabled(true);
        bexecute.setEnabled(false);
        bquery.setEnabled(false);
        bprev.setEnabled(false);
        bnext.setEnabled(false);
        bupdate.setEnabled(false);
        frame.show();
        frame.setDefaultCloseOperation(EXIT_ON_CLOSE);
    public static void main(String args[])
        MDILayout layout=new MDILayout();
    public void actionPerformed(ActionEvent ae)
        if (ae.getSource()==borders)
          intframe.show();
          intframe.repaint();
        if (ae.getSource()==boption)
          rangeframe.show();
          rangeframe.repaint();
}Please provide me the solution so that P1 appears in IF1 and P2 appears in P2.
Thanks in advance,
Ankur

all the controls are able to display on IF1 but after adding IF2 allthe controls are transferred from IF1 to IF2 and now IF1 displays as a blank screen
You can't have components at more than one place in the hierarchy. If you add a component to something it is removed from its existing parent if there is one.
I'm not sure how much that helps you - I took one look at your code and ran away screaming.

Similar Messages

  • Error getting license. License server communication problem: E_ADEPT_NO_TOKEN. Please help

    I try to download my ebooks on my laptop but receive the onscreen message, Error getting license, License server commucication problem: E_ADEPT_NO_TOKEN. Please help?

    It means, the URLLink.ACSM file is corrupted. Please contact the book store and ask them to check whether the configuration in the server side is correct for that book.
    One of the simple setting in the server which can case this issue is, setting the book for loan in server and providing the purchase option in the book store or vise verse.
    Hope this solves your problem.

  • I am not able to launch FF everytime i tr to open it, it says FF has to submit a crash report, i even tried doing that and the report was submitted too, but stiil FF did not start, and the problem still persists, please help me solve this issue in English

    Question
    I am not able to launch FF everytime i try to open it, it says FF has to submit a crash report,and restore yr tabs. I even tried doing that and the report was submitted too, but still FF did not start, and the problem still persists, please help me solve this issue
    '''(in English)'''

    Hi Danny,
    Per my understanding that you can't get the expect result by using the expression "=Count(Fields!TICKET_STATUS.Value=4) " to count the the TICKET_STATUS which value is 4, the result will returns the count of all the TICKET_STATUS values(206)
    but not 180, right?
    I have tested on my local environment and can reproduce the issue, the issue caused by you are using the count() function in the incorrect way, please modify the expression as below and have a test:
    =COUNT(IIF(Fields!TICKET_STATUS.Value=4 ,1,Nothing))
    or
    =SUM(IIF(Fields!TICKET_STATUS=4,1,0))
    If you still have any problem, please feel free to ask.
    Regards,
    Vicky Liu
    Vicky Liu
    TechNet Community Support

  • HT201263 my ipad give me the apple sign without running up it appears all the time in the screen , i tries to reset my ipad , but still in this problem , can you please help me?

    my ipad give me the apple sign without running up it appears all the time in the screen , i tries to reset my ipad , but still in this problem , can you please help me?

    You may want to look at this about using recovery mode to restore your iPad.
    http://support.apple.com/kb/ht4097

  • It won't let me drag an effect from the browser all of a sudden. I have always been able to do before. I am using effects from favorites bin and when I try to drag it, it won't move. I have never had this problem before. Please help.

    It won't let me drag an effect from the browser all of a sudden. I have always been able to do before. I am using effects from favorites bin and when I try to drag it to the timeline, it won't move. I have never had this problem before. Please help.
    P.S. I have tried other effects including transitions and it still won't let me drag.

    Wow that was really quick, thank you so much.  Im not sure at all which version it was because i said it was around 4 years ago he bought it.  I know it isn't under his username, since he's a PC person (ugh) so i know its probably registered to one of our actual names.  isn't there some way to look it up since we did register it, because I'm not even sure where the disks are from when we bought it (we've moved a lot and also have two storage lockers, i know i would have kept it with other disks) but my cd rom drive is actually broken on my computer as well ( i think it got stepped on and is now squished and won't eject or run disks.)
    So is there anyway they can look up that its registered to one of our names since we did register it when we bought and installed it, or do i really have to find the disk with some sort of proof of purchase (i know there would be no receipt after all this time)
    either way, ill do what you suggested to the best of my abilities and thank you so much for answering my questions, i can't even open the program as its incompatible and find out the info from that) so I'm in a bit of a pickle and your response was so thorough and it didn't seem to be posted long enough to even write a well researched response, thanks, all the best,
    sarucia

  • Mac Book Air sleeps when moved...i don't know whats the problem...please help me out if anyone knows about this...

    Mac Book Air sleeps when moved...i don't know whats the problem...please help me out if anyone knows about this...

    your reed switch for the monitor is defective, it thinks youve shut the lid when you havent
    mechanical fault , contact Apple for service and parts replacement.

  • I want to ask how to downgrade ios 7 to 6.1.3, because a lot of problems ios 7. please help

    I want to ask how to downgrade ios 6.1.3 to 7, because a lot of problems ios 7. please help

    I'm sorry, but Apple does not provide a downgrade path for iOS. Because downgrading is unsupported by Apple we cannot discuss it on these forums.

  • Please help 'Translate' These codes from AS2 to AS3 for me

    Hi, i need help 'translating' these codes from Action Script 2 to Action Script 3. Please Do it for me:
    toc    loadText = new LoadVars();
        loadText.load("Curie.txt");
        loadText.onLoad = function(success) {
            if (success) {
                // trace(success);
                Curie.html = true;
                Curie.htmlText = this.Curie;
    Please translate it for me, i need it ASAP thanks
    Kenneth

    Thank you for helping me
    Kenneth
    Date: Thu, 15 Oct 2009 05:49:14 -0600
    From: [email protected]
    To: [email protected]
    Subject: Please help 'Translate' These codes from AS2 to AS3 for me
    Take a look at that:
    http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/migration.html
    There is a LoadVars section on that.
    There is also a tutorial here:
    http://www.republicofcode.com/tutorials/flash/as3externaltext/
    Cheers,
    CaioToOn!
    >

  • HT1386 i tried to sync my ipad to my itunes using usb but it will say not charging,, i can sync with my ipod touch without any problem... please help..

    i tried to sync my ipad to my itunes using usb but it will say not charging,, i can sync with my ipod touch without any problem... please help..

    From http://support.apple.com/kb/HT4060 :
    The fastest way to charge your iPad is with the included 10W USB Power Adapter. iPad will also charge, although more slowly, when attached to a computer with a high-power USB port (many recent Mac computers) or with an iPhone Power Adapter. When attached to a computer via a standard USB port (most PCs or older Mac computers) iPad will charge, but only when it's in sleep mode.
    iPods need less power to charge them (their wall charger is half the power of the iPad's, 5W as opposed to 10W), so are more likely to charge via USB

  • I have comcast internet. Now I cannot open any of my e-mails.Please help me correct this problem. Comast is not the problem.

    I upgraded to a newer version of firefox. My ISP is Comcast.
    I tried opening up my e-mails they will not open up.I contacted Comcast ,they told me there customers have no problems opening their e-mails.Please help me with this problem asap.
    The problem started after I upgraded to the higher version.
    Thank you,
    Arnold
    My phone is: 313 882-9785

    If it's a thin 1 pixel wide vertical line it's highly likely it could be caused by a defective LCD.
    One quick basic way to check is to note the position of the line. Then go to System Preferences, Displays, and lower the resolution. If ther line moves it's on the video and the logic board or video card if fitted is likely to be defective. If the line stays in the same position it's likely to be an LCD fault. Either way to have it repaired you'll need to visit an Apple store or AASP.
    The worst offender for this problem is the Late 2006 17" iMac. FOC replacement of the LCD used to be covered by a quality program, but it's now ended.
    Steve

  • The font for my yahoo log in is very very small anbd my email fonts are far too big and the words overlap, please help to correct this problem

    The font for sign into my yahoo mail is so small that I am unable to make out my ID and password and when I do get into my mailbox, the fonts are far too big and the words overlap. Tried going into tools /options to make changes but not successful, please help.thanks

    Reset the page zoom on pages that cause problems, make sure that the window is not maximized:
    *<b>View > Zoom > Reset</b> (Ctrl+0 (zero); Cmd+0 on Mac)
    *http://kb.mozillazine.org/Zoom_text_of_web_pages
    If you have increased the minimum font size then try the default setting "none" as a high value can cause such issues.
    *Tools > Options > Content : Fonts & Colors > Advanced > Minimum Font Size (none)
    Make sure that you allow websites to choose their fonts.
    *Tools > Options > Content : Fonts & Colors > Advanced > [X] "Allow pages to choose their own fonts, instead of my selections above"
    You can use an extension to set a default font size and page zoom on web pages.
    *Default FullZoom Level: https://addons.mozilla.org/firefox/addon/default-fullzoom-level/
    *NoSquint: https://addons.mozilla.org/firefox/addon/nosquint/

  • Code not working cant figue out the problem...please help

    please find below a code for a dealer network which for some reason is giving the following error
    Internal Servlet Error: Unable to compile class for JSP/usr/local/jakarta-tomcat/work/www.nerolac.com_8080/_0002fdealer_00032_00031 _0002ejspdealer21_jsp_5.java:28: Class TreeSet not found in type declaration. TreeSet tcity; ^ /usr/local/jakarta-tomcat/work/www.nerolac.com_8080/_0002fdealer_00032_00031_00 02ejspdealer21_jsp_5.java:243: Class TreeSet not found in type declaration. tcity=new TreeSet(); ^ 2 errors
    The code
    <%@ page language="java" isErrorPage="false" errorPage="error.jsp" import="java.sql.*,java.util.*"%>
    <jsp:useBean id="conb" class="nerolac.ConnOdbc" />
    <%!
    String sql_state,form_state,sql_city,flag,city,sql_details,address;
    ResultSet rs_state;
    String id,stateid;
    ResultSet rs_city;
    ResultSet rs_details;
    TreeSet = tcity;
    %>
    <SCRIPT ID=clientEventHandlersJS LANGUAGE=javascript>
    <!--
    function state_onchange()
    if (document.testa.state.selectedIndex!=0)
    if(document.testa.city == document.undefined)
    else
    document.testa.city .value="";
    document.testa.submit();
    function city_onchange()
    if (document.testa.city.selectedIndex!=0)
    document.testa.submit();
    //-->
    </SCRIPT>
    <html>
    <head>
    <title>New Page 1</title>
    <script language="JavaScript">
    image1a = new Image()
    image1b = new Image()
    image2a = new Image()
    image2b = new Image()
    image3a = new Image()
    image3b = new Image()
    image4a = new Image()
    image4b = new Image()
    image5a = new Image()
    image5b = new Image()
    image7a = new Image()
    image7b = new Image()
    image8a = new Image()
    image8b = new Image()
    image9a = new Image()
    image9b = new Image()
    image10a = new Image()
    image10b = new Image()
    image1a.src = "images/s8.gif"
    image1b.src = "images/s8_pop.gif"
    image2a.src = "images/s9.gif"
    image2b.src = "images/s9_pop.gif"
    image3a.src = "images/s10.gif"
    image3b.src = "images/s10_pop.gif"
    image4a.src = "images/nav_whypaint.gif"
    image4b.src = "images/whypaint_pop.gif"
    image5a.src = "images/s3.gif"
    image5b.src = "images/s3_pop.gif"
    image7a.src = "images/dn3.gif"
    image7b.src = "images/dn3_pop.gif"
    image8a.src = "images/top.gif"
    image8b.src = "images/top_pop.gif"
    image9a.src = "images/i24.gif"
    image9b.src = "images/i24_pop.gif"
    image10a.src = "images/i25.gif"
    image10b.src = "images/i25_pop.gif"
    </script>
    <link rel="stylesheet" href="scripts/style.css" type="text/css">
    <style>
    .a1{cursor:hand}
    </style>
    </head>
    <body topmargin="0" leftmargin="0" marginheight="0" marginwidth="0" background="images/s12.gif">
    <table border="0" cellpadding="0" cellspacing="0" width="637">
    <tr>
    <td colspan="5" width="667"><img border="0" src="images/c1.gif" width="68" height="56"><img border="0" src="images/dn1.gif" width="115" height="56"><img border="0" src="images/dn2.gif" width="105" height="56"><a href="index.jsp target="_top"></a><img border="0" src="images/s3.gif" width="38" height="56" name="ix"><a href="index.jsp target="_top"></a><img border="0" src="images/dn3.gif" name="pa"><img border="0" src="images/dn4.gif" width="59" height="56"><img border="0" src="images/n5.gif" width="96" height="56"><img border="0" src="images/n6.gif" width="73" height="56"></td>
    </tr>
    <tr>
    <td colspan="4" width="667"><img border="0" src="images/dealernetwork_h.gif" ></td>
    </tr>
    <tr>
    <td colspan="4" width="667"><img border="0" src="images/s12.gif" width="635" height="26"></td>
    </tr>
    <tr>
    <td width="26"> </td>
    <td>
    <%
    conb.OpenConn();
    sql_state = "select * from statenetwork";
    rs_state=conb.getResult(sql_state);
    %>
     <table><tr><td>  </td></ tr></table>
    <form name="testa" action="dealer2.jsp" method="get">
    <div align="center">
    <center>
    <table border="0" cellpadding="2" width="600" bordercolor="#000000" bordercolorlight="#000000" bordercolordark="#000000" height="61">
    <tr><td height="23"></td>
    <td width="15%" bgcolor="#B5D2CA" height="23" align="Center"><b><font face="Arial" size="2">Select
    State</font></b></td>
    <%
    if (request.getParameter("state") !=null)
    if (!request.getParameter("state").equals(""))
    %>
    <td width="5%" bgcolor="#B5D2CA" height="23" align="Center"><b><font face="Arial" size="2">Select
    City</font></b></td>
    <td width="15%" height="23" align="Center"><b><font face="Arial" size="2"></font></b></td>
    <%}
    %>
    </tr>
    <tr>
    <td width="313">
    </td>
    <%
    form_state = request.getParameter("state");
    if(!form_state.equals(""))
    try{
    sql_city = "select ID,city,STATEID from dealernetwork where state = '"+ form_state+"'";
    rs_city=conb.getResult(sql_city);
    flag = "true";
    catch(Exception e)
    System.out.println("IN EXCEPTINO-----"+e.getMessage());
    %>
    <td width="192" height="26" bordercolordark="#00FFFF" align="center">
     <font face="Arial" size="2"><select name="state" onchange="return state_onchange()">
    <%if(form_state.equals("")){%>
    <font face="Arial" size="2"><option selected> -- Select State -- </option></font>
    <%}else{%>
    <font face="Arial" size="2"><option> -- Select State -- </option></font>
    <%}%>
    <%while(rs_state.next()){%>
    <%if((request.getParameter("state")).equals(rs_state.getString("state"))){%& #38; gt;
    <option selected><%= rs_state.getString("state")%></option>
    <%}else{%>
    <option><%= rs_state.getString("state")%></option>
    <%
    %>
    </select>
    </font>
    </td>
    <td width="167" height="26" align="center">
    <%if (!request.getParameter("state").equals(""))
    %>
    <font face="Arial" size="2">
    <select name="city" onchange="return city_onchange()">
    <%
    if(request.getParameter("city") != null)
    %>
    <font><option selected><%=request.getParameter("city")%></option></font>
    <%}
    else{%>
    <font><option selected >Select City</option></font>
    <%}%>
    <%
    tcity=new TreeSet();
    while(rs_city.next())
    String s1 = rs_city.getString("CITY");
    id = rs_city.getString("ID");
    stateid = rs_city.getString("STATEID");
    s1 =s1.toLowerCase();
    String f1 = (s1.substring(0,1)).toUpperCase();
    String s2 = s1.substring(1,s1.length());
    city=f1+s2;
    tcity.add(city);
    %>
    <% Iterator cityIterator = city.titerator();
    while (cityIterator.hasNext())
    String u_city = (String)cityIterator.next();
    %>
    <font size=""><option value="<%=u_city%>"><%=u_city%></option></font>
    <% } %>
    </select>
    </font>
    <% }%>
    </td>
    </tr>
    </table>
    </center>
    </div>
    <center>
    <br>
    </center>
    <span style="position: absolute; left: 15; top: 121; z-index: -2"><img src="images/indiamap.jpg" width="248" height="245"></span>
    <br><p> </p>
    <p>               &nbsp ;       &nbs p ;      
           &nbsp ;       &nbs p ;       &nbs p ;       &nbs p ;       &nbs p ;      
           &nbsp ;       &nbs p ;       &nbs p ;       &nbs p ;   <br><p>  &nbsp ;    </p>
    <%
    if(request.getParameter("city") != null)
    String upper = request.getParameter("city").toUpperCase();
    String lower = request.getParameter("city").toLowerCase();
    String firstCap =request.getParameter("city").toLowerCase();
    String firstCap1 = (firstCap.substring(0,1)).toUpperCase();
    String firstCap2 = firstCap.substring(1,firstCap.length());
    String firstCap3=firstCap1+firstCap2;
    sql_details = "select * from dealernetwork where city= '"+ upper +"' or city= '"+ firstCap3 +"' or city= '"+ lower +"' and stateid="+stateid+"";
    rs_details=conb.getResult(sql_details);
    %>
    <div align="center"><center>
    <table>
    <tr>
    <td><font color="#000000">
    <b>Listing of dealer's addresses corresponding to the selected cities are as follows:</b>
    </font>
    </td>
    </tr>
    <tr><td></td></tr><tr><td></td></t r><tr><td></td></tr><tr><td></td>& #38;l t;/tr><tr><td></td></tr>
    </table>
    </center></div>
    <%
    while(rs_details.next())
    %>
    <div align="center">
    <center>
    <table border="0" cellpadding="2" cellspacing="1" width="82%">
    <tr>
    <td width="30%" bgcolor="#B5D2CA" align="left" bordercolor="#000000" bordercolorlight="#000000" bordercolordark="#000000"><b><font face="Arial" size="2">Dealer Name</font></b></td>
    <td width="56%" bordercolor="#000000" bordercolorlight="#000000" bordercolordark="#000000" bgcolor="#D2E3DE"><font face="Arial" size="2">
    <%
    String dealer =rs_details.getString("dealer").toLowerCase();
    String dealer1 = (dealer.substring(0,1)).toUpperCase();
    String dealer2 = dealer.substring(1,dealer.length());
    String dealer3=dealer1+dealer2;
    out.println(dealer3);
    %></font></td>
    </tr>
    <tr>
    <%
    address = "";
    if(!(rs_details.getString("address1").equals("null")))
    String s1 = address +" "+ rs_details.getString("address1").toLowerCase();
    String f1 = (s1.substring(0,1)).toUpperCase();
    String s2 = s1.substring(1,s1.length());
    address=f1+s2;
    if(!(rs_details.getString("address2").equals("null")))
    address = address +" "+ rs_details.getString("address2");
    address =address.toLowerCase();
    if(!(rs_details.getString("address3").equals("null")))
    address = address +" "+ rs_details.getString("address3");
    address =address.toLowerCase();
    %>
    <td width="30%" bgcolor="#B5D2CA" align="left" bordercolor="#000000" bordercolorlight="#000000" bordercolordark="#000000"><b><font face="Arial" size="2">Address</font></b></td>
    <td width="56%" bordercolor="#000000" bordercolorlight="#000000" bordercolordark="#000000" bgcolor="#D2E3DE"><font face="Arial" size="2">
    <%if(!address.equals("")){%><%=address%><%}%>
    </font></td>
    </tr>
    <tr>
    <td width="30%" bgcolor="#B5D2CA" align="left" bordercolor="#000000" bordercolorlight="#000000" bordercolordark="#000000"><b><font face="arial" size="2" >Phone</font></b></td>
    <td width="56%" bordercolor="#000000" bordercolorlight="#000000" bordercolordark="#000000" bgcolor="#D2E3DE">
    <%if(!(rs_details.getString("phone").equals("null"))){%><%=rs_details. getString("phone")%><%}else {%><font face="Arial" size="2">N.A.</font><%}%></td>
    </tr>
    <tr><td> </td></tr>
    </table>
    </center>
    </div>
    <%
    %>
    <%
    conb.CloseStmt();
    conb.CloseConn();
    %>
    </form>
    </td>
    </tr>
    </table>
    </body>
    </html>
    Please tell me where the code is not right

    Don't cross post
    http://forum.java.sun.com/thread.jspa?threadID=576928&messageID=2891328
    Please format your code using the buttons marked "Code" above the text area where you submit your posting.
    <%!
    String sql_state,form_state,sql_city,flag,city,sql_details,address;
    ResultSet rs_state;
    String id,stateid;
    ResultSet rs_city;
    ResultSet rs_details;
    TreeSet = tcity;// <-- Here. Remove the equals sign "=". 
    %>

  • SAPscript Output Problem - Very Urgent - Please help

    Hi,
    I am having the following problem with SAPscript.
    In the Main Window, I have instructions to the printer in the ZPL2 language (For Zebra Printer).
    There are also several variables, which are highlighted in Gray and enclosed in the’&’.
    There are also several elements – all of them empty except for the one where this code is.
    Now, I received this program to modify in terms of code and the output.
    IF you have never done any work with Zebra Printing, the way it is done is that you create a label using the Zebra BarOne or Zebra Designer program, then output it to an ‘itf’ file, upload it into a standard text as .itf and copy the uploaded contents to the main window. When printing to a Zebra printer, the Zebra printer will read the instructions and will print the output.
    Here is the problem: The config for the output type is correct.
    When doing a printing test from SAPscript, I get the right output and the Zebra printer is able to print it.
    However, the real process for this task will go through MB02. There, if I create a spool request using the proper method (select output type and etc.), it will go the spool. However, if I print preview or output (doesn’t work with the Zebra printer, so I have to output to the Laser printer), it will output the following (none of the following includes any of the ZPL2 code/instructions. Instead, it seams to print the variables contents with the field name next to it – This isn’t whats it’s the Main window!!!)
    http://img244.imageshack.us/img244/6915/66052475zk2.jpg
    Please help. I have debugged but don’t know what to do and can’t find anything wrong.
    This is very urgent. Any help will be useful.
    Thanks,
    John

    Ok, maybe I have confused others in regards to the issue as well.
    We expect this label to be output from a Zebra Printer.
    When output through Sapscripts printing test, the preview from the spool shows the ZPL2 code in small font (non readible if a created a screenshot) and if sent to the Zebra Printer, it prints the label correctly.
    When output through MB02, the preview from the spool shows the code that I have attached to the 1st post in this thread. If I try to output to the Zebra Printer, nothing happens because the ZPL2 instructions are not even in the preview and therefore, the Zebra printer recieves no instructions. I should not have mentioned the laser printer, because it has nothing to do with this issue.
    I hope that this makes the issue a little more clear and understandable. Please help.
    Here is the ZPL2 coding before uploading to standard text (only difference is that once uploaded,  the '/' characters are removed.) However, I believe that the problem may lie in the print program and how it compiles but I debugged and haven't really seen where it comes from:
    /:NEW-PAGE
    / ^XA
    / DFNEW-RE-1FS
    / ^PRC
    / LH0,0FS
    / ^LL1830
    / ^MD0
    / ^MNY
    / LH0,0FS
    / FO244,854A0N,55,46CI13FRFB154,1,0,LFN999^FS
    / FO819,698A0N,55,46CI13FRFN998FS
    / FO245,477A0N,55,46CI13FRFB755,1,0,RFN997^FS
    / FO389,926A0N,55,46CI13FRFB654,1,0,RFN996^FS
    / BY3,3.0FO42,1072B3N,N,152,N,YFRFN995FS
    / FO276,1258A0N,55,46CI13FRFN995FS
    / FO484,774A0N,55,46CI13FRFN994FS
    / FO817,774A0N,55,46CI13FRFN993FS
    / FO611,556A0N,55,46CI13FRFN992FS
    / FO245,556A0N,55,46CI13FRFN991FS
    / FO397,117A0N,55,46CI13FRFN990FS
    / FO245,405A0N,55,46CI13FRFB880,1,0,RFN989^FS
    / FO244,698A0N,55,46CI13FRFN988FS
    / FO629,998A0N,55,46CI13FRFN987FS
    / FO244,623A0N,52,42CI13FRFN986FS
    / FO397,261A0N,55,46CI13FRFB404,1,0,RFN985^FS
    / FO819,854A0N,55,46CI13FRFN984FS
    / FO725,554A0N,55,46CI13FRFN983FS
    / FO397,189A0N,55,42CI13FRFB695,1,0,RFN982^FS
    / FO397,333A0N,55,42CI13FRFN981FS
    / FO638,333A0N,55,42CI13FRFN980FS
    / FO391,21A0N,63,63CI13FRFB433,1,0,CFN979^FS
    / FO36,698A0N,55,46CI13FR
    / FDWBS:FS
    / FO37,405A0N,55,46CI13FR
    / FDMATL:FS
    / FO37,478A0N,62,44CI13FR
    / FDDESC:FS
    / FO554,698A0N,55,46CI13FR
    / FDSUPPLIER:FS
    / FO32,625A0N,55,46CI13FR
    / FDTEXT:FS
    / FO35,1258A0N,55,46CI13FR
    / FDBATCH NO:FS
    / FO770,775A0N,63,51CI13FR
    / FD/FS
    / FO32,854A0N,55,46CI13FR
    / FDESHM:FS
    / FO37,556A0N,55,46CI13FR
    / FDQTY:FS
    / FO32,998A0N,55,46CI13FR
    / FDSAP MATERIAL DOC NO:FS
    / FO525,333A0N,55,46CI13FR
    / FDofFS
    / FO556,854A0N,55,46CI13FR
    / FDINSPECT:FS
    / FO32,926A0N,55,46CI13FR
    / FDUNLOADING:FS
    / FO37,117A0N,55,46CI13FR
    / FDSTOCK TYPE:FS
    / FO32,774A0N,55,46CI13FR
    / FDPURCHASE ORDER:FS
    / FO37,188A0N,55,46CI13FR
    / FDDELIVER TO:FS
    / FO37,260A0N,55,46CI13FR
    / FDSTORAGE LOC:FS
    / FO37,332A0N,55,46CI13FR
    / FDCONTAINERS:FS
    / FO1,1359GB1217,0,6^FS
    / FO594,1359GB0,474,6^FS
    / ^XZ
    /:NEW-PAGE
    / ^XA
    / ^XFNEW-RE-1.ZPL
    / FN999FD&ATWRT_HAZAMAT(6)&^FS
    / FN998FD&EKKO-LIFNR&^FS
    / FN997FD&MABDR-MAKTX&^FS
    / FN996FD&MSEG-ABLAD&^FS
    / FN995FD&MSEG-CHARG&^FS
    / FN994FD&MSEG-EBELN&^FS
    / FN993FD&MSEG-EBELP&^FS
    / FN992FD&MSEG-ERFME&^FS
    / FN991FD&MSEG-ERFMG&^FS
    / FN990FD&MSEG-INSMK(1)&^FS
    / FN989FD&MSEG-MATNR&^FS
    / FN988FD&MSEG-MAT_PSPNR&^FS
    / FN987FD&MSEG-MBLNR&^FS
    / FN986FD&MSEG-SGTXT(40)&^FS
    / FN985FD&MSEG-UMLGO&^FS
    / FN984FD&QALS-PRUEFLOS&^FS
    / FN983FD&V_BACKORDER&^FS
    / FN982FD&V_NAME3&^FS
    / FN981FD&WS_CNTR&^FS
    / FN980FD&WS_CON&^FS
    / FN979FD&WS_HEADER& &^FS
    / ^PQ1,0,1,N
    / ^XZ
    / ^FX End of job

  • Getting time zone problem in Vista Please help?

    Aslam-o-Alaikum
    I am using JDk 1.5.0_0.8 on Windows Vista and i am having problem in retreiving correct Time zone. it always returns "Greenwich Mean Time" when i run
    "System.out.println(TimeZone.getDefault().getDisplayName());"
    on vista where as it returns "GMT+05:00" on Windows Xp and all previous versions. Because of this problem i am unable to retrieve current date correctly in Vista where as the same code runs fine in Windows XP. Please help!!!!!!!!!

    I am having a similar problem with JRE 1.4.2_07 and Windows Server 2008. The time zone returned is ALWAYS GMT for the default time. I can work around this by explicitely setting the time zone in my code, but my customer would like a real fix. TZUPDATER seems to have no effect. Any ideas?

  • Image problem in Dreamweaver Please Help!

    I have attached an image in dreamweaver and it looks fine when I preview it in the browser but when it put it on the hosting site it is not there. What should I do?

    Hi all, i've being talking with Murray regarding an issue that I am having on posting images online with Dreamweaver (please find below), if anyone can help please write.
    Murray in answering your question: Yes all images are RGB. let me know if there is anyother thing that I should check.
    Thanks,
    Gabriel
    Just duplicate the information in a new thread on the public Dreamweaver General Discussion forum.
    Also, are your images RGB or CMYK?  If the latter then they won't show on the web.  They must be in RGB color space to show....
    Murray
    Hi Murray,
    Thanks  for answering. Yes I have no problem on posting it to the public, it is  just that I've being posting this problem in other forums and not  getting any answer so I thought that sending a private message could be  more efficient. How should I redirect my question to the public forum?  just copy my question and post as a new threat?
    Regarding  my problem I am apparantly doing everything correct. I first created an  image folder on my local "website" folder and I put all images there  (lower case, single word, jpags and gif). So I went to  Insert->Rollover Image and place the images. Then I saved the  document and locally tested (pressing F12) and everything was working  great. Next I select the document and Site->Put. I reloaded my IE and  the images didn't show up. I went back to dreamweaver and manually  selected each image that I insert and one by one I upload to the  website. I checked the remote server and they are all there on the  correct location, but they still dono't appear on my website.
    I  am researching this problem for more than 5 days and I am really  considring to built my website with other tool (rather than Dreamweaver)  as I just can't figure it out why in earth these images don't display).
    Thanks,
    gabriel
    Gabriel,  do you feel comfortable posting this to the public forum?  That's the  right way to use it.  Let everyone try to help you.  When you post  there, please be sure to give enough information for someone to try to  answer.  If a process is failing for you, describe each step in the  process with enough detail to allow someone to recreate that process.
    Looking  at the code on your projects page I can only think that your images are  not being uploaded to the correct location.  Do you SEE those images on  the remote site?
    Anyhow, you can add the answer to this to your post on the public forum....
    Murray
    Hi  Murray, I found you in some forums re: Dreamweaver, I hope you can help  me. I am trying desperately for the last 6 days upload images on my  website. I have checked the sources/paths 1000 times and everything  match, I really don't know why I can't see a single image online. The  website is www.gabriel.kochece.com, if you go to projects all these  links are suppose to be images...
    Thanks in advance,
    gabriel
    Adobe Forums >                      People >    gab_kce >              Private Messages >               Inbox
    Adobe Forums powered by Jive Software's Clearspace ® 2.5.16 - Submit product feedback
    © Jive Software
    Careers
    Online Privacy Policy
    Terms of Use
    Contact us
    Accessibility
    Report piracy
    Permissions and trademarks
    Product license agreements
    Send feedback
    Copyright © 2010 Adobe Systems Incorporated. All rights reserved.
    Use of this website signifies your agreement to the Terms of Use and Online Privacy Policy (updated 07-14-2009).

Maybe you are looking for