Help please!  Using classes in large swing applications.

I am building a fairly large swing application. The class that builds the main frame for the application is getting extremely long with code because I have so many seperate JPanels. I'm using JDialogs wherever possible, but in many cases I need a JPanel within my main frame. I've been trying to build these panels within their own seperate classes, but it seems that the components are not being drawn. Any help or a small example would be great!

So... The question is: You don't know how to use JPanels built in other classes?
You should probably just try to find some sort of reference code and work from that. It's really not that hard

Similar Messages

  • Alv field with f4 help without using class

    Hi,
    Can any one give me a program of "Alv field with f4 help without using class".
    Thanking you in advance.

    hi
    <b>Linking F4 Help to Fields</b>
    For the last section, we will deal with linking F4 help to fields. It is easy. As usual, define, implement and register the event “onf4” at proper places in your code. For F4 help, you must register the fields whose F4 request will trigger the “onf4” event. For this you must prepare a table of type “LVC_T_F4” and register this table using the method “register_f4_for_fields”. While preparing table you must include a line for each field which will trigger F4 event. For each field in the structure;
    &#1048766; Pass the fieldname to ‘FIELDNAME’
    &#1048766; Set ‘REGISTER’ to make the field registered,
    &#1048766; Set ‘GETBEFORE’ to provide field content transport before F4 in editable mode
    &#1048766; Set ‘CHNGEAFTER’ to make the data changed after F4 in editable mode.
    DATA: lt_f4 TYPE lvc_t_f4 WITH HEADER LINE .
    lt_f4-fieldname = 'PRICE'.
    lt_f4-register = 'X' .
    lt_f4-getbefore = 'X' .
    APPEND lt_f4 .
    CALL METHOD gr_alvgrid->register_f4_for_fields
    EXPORTING
    it_f4 = lt_f4[] .
    Preparing table for the fields to be registered to trigger F4 event
    METHOD handle_on_f4 .
    PERFORM f4_help USING e_fieldname es_row_no .
    er_event_data->m_event_handled = 'X' .
    ENDMETHOD .
    A sample “onf4” method implementation
    Again, we set the attribute “er_event_data->m_event_handled” to prevent further processing of standard F4 help.
    regards
    Ravish
    <b>
    reward if useful</b>

  • I'm in syria and they blocked me from using any VPN service please help without VPN i can't open the store help please ( using iphone 5 version 9.1.4 )

    I'm in syria and they blocked me from using any VPN service please help without VPN i can't open the store help please ( using iphone 5 version 9.1.4 )

    There is nothing that anyone here on a user forum can do to help you.  If it is a local issue in Syria, then you need to take it up with your phone company or authorities there who have prevented you from using VPN.
    Nobody here can help you.

  • Is it save to use class variables in stateful application modules?

    I've a simple question of understanding: Can I savely use class-variables in stateful application modules?
    Consider the following example:
    public class myStateFullAppModuleImpl extends ApplicationModuleImpl
    private int myVar=0;
    public int doMyWork()
    myVar++;
    return myVar;
    Is it save to use "myVar" this way considering AM-pooling? Or should I save "myVar" in the session instead?
    Thanks

    Please see reply at:
    Is it save to use class variables in a stateful application module?

  • Using Report tool with Swing Application

    I'd like to use a reporting tool (Crystal Reports or anything else) with Swing application. Could anyone help me?

    You have to pass the values are parameters to the Oracle Reports report. Take a look at this: http://www.oracle.com/technology/products/database/application_express/howtos/howto_integrate_oracle_reports.html
    Also you can search this forum for "Oracle Reports"
    Mike

  • Tuning GC parameters for a large Swing application

    Our Swing application suffers from periodic out-of-memory errors. We have been trying to tune the application with limited sucess.
    The problem is full GC is called only when it is close to the maximum memory. As a result when it reaches the max-heap-size values, it takes a long time to complete GC and the application hangs.
    My current jnlp settings are as follows:
    <j2se version="1.5+" href="http://mydomain/myapp/jre" initial-heap-size="64M"
      max-heap-size="384M"
      java-vm-args="-verbose:gc -Dsun.java2d.noddraw=true -XX:NewSize=16m -XX:SurvivorRatio=8 -XX:YoungGenerationSizeIncrement=5 -XX:TenuredGenerationSizeIncrement=5 -XX:AdaptiveSizeDecrementScaleFactor=5" />I am looking at ways by which the tenured generation too gets garbage collected peiodically. Is there a way by which I can achieve this?

    for first one, try paintImmediately(rectangle) method. for second one, i guess Graphics g = panel.getGraphics();
    g.drawRect(....);

  • Help please: error in deploying sample googleflow application

    Hi,
    I am trying to deploy the sample tutorial of googleflow, I have even changed the proxy setting of jdeveloper..i have added localhost in proxy exception list..application server connection & integration server connection is ok..but still getting the error of accessing the wsdl as shown below....please help !!!
    BUILD FAILED
    E:\product\10.1.3.1\OracleAS_2\bpel\samples\tutorials\128.GoogleFlow\GoogleFlowWithSensors\build.xml:79: A problem occured while connecting to server "localhost" using port "8888": bpel_GoogleFlowWithSensors_1.0.jar failed to deploy. Exception message is: ORABPEL-05215
    Error while loading process.
    The process domain encountered the following errors while loading the process "GoogleFlowWithSensors" (revision "1.0"): Failed to read wsdl.
    Error happened when reading wsdl at "E:\product\10.1.3.1\OracleAS_2\bpel\domains\default\tmp\.bpel_GoogleFlowWithSensors_1.0_ad22c84cfb6e04057f27bedbbcbcf2da.tmp\GoogleSearchRef.wsdl", because "Error reading import of file:/E:/product/10.1.3.1/OracleAS_2/bpel/domains/default/tmp/.bpel_GoogleFlowWithSensors_1.0_ad22c84cfb6e04057f27bedbbcbcf2da.tmp/GoogleSearchRef.wsdl: Failed to read wsdl file at: "http://api.google.com/GoogleSearch.wsdl", caused by: java.net.ConnectException. : Connection refused: connect".
    Make sure wsdl exists at that URL and is valid.
    If you have installed a patch to the server, please check that the bpelcClasspath domain property includes the patch classes.
    at com.collaxa.cube.engine.deployment.CubeProcessHolder.bind(CubeProcessHolder.java:285)
    at.....................
    Message was edited by:
    user621834

    I also face the same problem. Can some one help us

  • HELP PLEASE!!! 4.5 application loader!

    i have downloaded the 4.5 update for my brand new curve. i began to install it and it stopped working, deleting everything off my phone. i know have a hand set with an tiny application window on it with a cross through it. when i go to re-try the application loader for the 4.5 update it doesn't recognise my handset!! neither does my desktop software. please please help i don't know how to get anything back on the phone or update it to the new software without my computer recognising it!"

    I had the same thing happen to me a few months ago, however, I was not trying to use the app loader. I contacted my cellular provider and they told me that my OS had crashed and that there was nothing I could do about it. They sent me a replacement phone right away and I haven't had a problem with it since.

  • Dreamweaver CC layout help please (using floats)

    Hi All,
    I'd appreciate any help with this problem creating my ideal Dreamweaver CC layout!
    Please see the screen shot below. Everything is perfect except I can't get the div labeled "div-right" at the bottom to sit on the right just like the one that sits on the left of middle divs that I have already aligned nicely.
    I have my coding the way I understand most, so I can attach that in another post if needed.
    Thanks!!!!

    sorry Nancy, work is very busy!
    For now, here is my code
    I hope its of some use at least for now..
    Thanks!
    <!doctype html> 
    <html> 
    <head> 
    <meta charset="utf-8"> 
    <title>HTML5 2-Col Layout</title> 
    <meta name="viewport" content="width=device-width, initial-scale=1"> 
    <!--[if IE]> 
    <meta http-equiv="X-UA-Compatible" content="IE=edge"> 
    <![endif]--> 
    <!--[if lt IE 9]> 
    <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script> 
    <![endif]--> 
    <style> 
    /**CSS Reset**/ 
        padding: 0; 
    /**fixes the CSS box model in responsive layouts**/ 
        -webkit-box-sizing: border-box; 
        -moz-box-sizing: border-box; 
        box-sizing: border-box; 
    img { 
        max-width: 100%; 
        vertical-align: baseline; 
    body { 
        padding: 0; 
        width: 90%; /**adjust width in px or % as required**/ 
        margin: 0 auto; /**this is centered**/ 
        background: #F5DD83; 
        color: #505050; 
        font-family: Segoe, "Segoe UI", "DejaVu Sans", "Trebuchet MS", Verdana, sans-serif; 
        font-size: 100%; 
        box-shadow: 2px 2px 4px #333; 
    header { 
        margin: 0; 
        padding: 0 1%; 
        width: 100%; 
        background: #B00202; 
        color: #FFF; 
    header h1, header h2 { 
        display: inline; 
        color: #F5DD83; 
        padding: 0 1%; 
    /**top menu**/ 
    nav { 
        background: #69C; 
        font-family: Gotham, "Helvetica Neue", Helvetica, Arial, sans-serif; 
        font-size: 14px; 
        font-weight: bold 
    nav ul { 
        margin: 0; 
        padding: 0; 
    nav li { 
        list-style: none; 
        display: inline-block; 
        margin: 0 3% 0 5%; 
    /**menu link styles**/ 
    nav li a { 
        color: #FFF; 
        text-decoration: none; 
        line-height: 2.5em; 
        padding: 6px; 
        border: 1px solid #CCC; 
    /**on select or mouseover**/ 
    nav li a:hover, nav li a:active, nav li a:focus { 
        background: #CCC; 
        color: #505050; 
    #wrapper { 
        background: #DDD; 
        overflow: hidden; /**float contaiment**/ 
    /**left sidebar**/ 
    aside { 
        padding: 0 2%; 
        float: left; 
        width: 30%; 
    /**main content**/ 
    article { 
        padding: 0 2%; 
        background: #FFF; 
        float: left; 
        width: 70%; 
    figure {  
    width: 80%;  
    margin: 4% auto 4% auto;  
    text-align:center; 
    figcaption { 
        text-align: center; 
        font-style: oblique; 
        font-size: small; 
        color: #2294AE; 
    footer { 
        clear: both; 
        background: #B00202; 
        color: #FFF; 
        text-align: center; 
        margin: 0; 
    /**text styles**/ 
    h3 { 
        color: #2294AE; 
        margin-bottom: 0 
    p { margin: 0 0 1em 0 } 
    #left-div {
      background-color: #D3D3D3;
      height: 100px;
      width: 650px;
    </style> 
    <link rel="stylesheet" href="ajxmenu3.css" type="text/css">
    <link rel="stylesheet" href="ajxmenu4.css" type="text/css">
    <link rel="stylesheet" href="ajxmenu6.css" type="text/css">
    </head> 
    <body> 
    <!--begin header--> 
    <header> <h1>Hassengate Pharmacy</h1> 
    </header> 
    <!--begin navigation--> 
    <nav> 
    <ul> 
    <div class="AJXCSSMenuUGYETAC"><!-- AJXFILE:ajxmenu4.css -->
    <div class="ajxmw">
      <div class="ajxmw2">
    <div class="ajxtbg">
    <ul>
    <li class="tfirst"><a href="#">Home</a></li>
    <li class="tsub"><a class="ajxsub" href="www.google.com">Pharmacy</a>
      <ul>
       <li class="sfirst slast"><a href="#">News</a></li>
      </ul>
    </li>
    <li class="tsub"><a class="ajxsub" href="#">Shop</a>
      <ul>
       <li class="sfirst slast"><a href="#">Offers</a></li>
      </ul>
    </li>
    <li class="tsub"><a class="ajxsub" href="#">NHS Services</a>
      <ul>
       <li class="sfirst"><a href="#">MUR</a></li>
       <li class="slast"><a href="#">NMS</a></li>
      </ul>
    </li>
    <li class="tsub"><a class="ajxsub" href="#">Blah</a>
      <ul>
       <li class="sfirst slast"><a href="#">1</a></li>
      </ul>
    </li>
    <li class="tsub"><a class="ajxsub" href="#">Blah</a>
      <ul>
       <li class="sfirst slast"><a href="#">2</a></li>
      </ul>
    </li>
    <li class="tsub"><a class="ajxsub" href="#">Blah</a>
      <ul>
       <li class="sfirst slast"><a href="#">3</a></li>
      </ul>
    </li>
    <li class="tlast tsub"><a class="ajxsub" href="#">Blah</a>
      <ul>
       <li class="sfirst slast"><a href="#">4</a></li>
      </ul>
    </li>
    <li class="tlast tsub"></li>
    </ul>
    </div>
      </div>
    </div>
    <br >
    </div>
    </ul> 
    </nav> 
    <div id="wrapper">  
    <!--begin left sidebar--> 
    <aside>
      <p align="center"> 
      <p align="center">Conditions
      <div class="AJXCSSMenuWOENVAC">
        <div align="left">
          <!-- AJXFILE:ajxmenu6.css -->
        </div>
        <div class="ajxmw">
          <div class="ajxmw2">
            <div class="ajxtbg">
              <div align="left">
                <ul>
                  <li class="tfirst tsub"><a class="ajxsub" href="#">Condition 1</a>
                    <ul>
                      <li class="sfirst slast"><a class="ajxsub" href="#">1-1</a>
                        <ul>
                          <li class="sfirst slast"><a href="#">1-1-1</a></li>
                        </ul>
                      </li>
                    </ul>
                  </li>
                  <li class="tsub"><a class="ajxsub" href="#">Condition 2</a>
                    <ul>
                      <li class="sfirst slast"><a class="ajxsub" href="#">2-2</a>
                        <ul>
                          <li class="sfirst slast"><a href="#">2-2-2</a></li>
                        </ul>
                      </li>
                    </ul>
                  </li>
                  <li class="tlast tsub"><a class="ajxsub" href="#">Condition 3</a>
                    <ul>
                      <li class="sfirst slast"><a class="ajxsub" href="#">3-3</a>
                        <ul>
                          <li class="sfirst slast"><a href="#">3-3-3</a></li>
                        </ul>
                      </li>
                    </ul>
                  </li>
                </ul>
              </div>
              </div>
            </div>
        </div>
        <div align="left"><br >
        </div>
      </div> </p>
      <p> </p>
      </p> 
    </aside> 
    <!--begin main content--> 
    <article> <h3>Article</h3> 
    <p> </p> 
    <figure></figure>
    <figure>
      <figcaption></figcaption> 
    </figure> 
    </article> 
    <!--end wrapper--></div> 
    <!--begin footer--> 
    <footer>  
    <small>© Hassengate Pharmacy 2014 All rights reserved</small>  
    </footer> 
    </body> 
    </html> 

  • Help needed in writing installers for swing application

    Hi ,
    I want to write an installer for one of our home grown profiler tool. I need to write the installer for different platforms such as windows,linux,solaris,HP-UX.
    Does anybody have any idea of how to go ahead in writing installations. Share if there is any good links such as tutorials as well is thr any opensource tool (similar to installsheild) to write installers . As well following is the tentative algorithm for my install sheild
    1. Create a home dir for the tool and put all the application files in tht.
    2. Installing a 3rd party jar and make a home for it.
    3. Option for user to select the features(i hv 2 features. user can either select both or select individual feature) to be installed.
    4. Select the appserver home if any. On selection i hv to update the classpath in the startup batch file for the application(This is the toughest step i beleive bcoz each appserver have different folder structures and different startup batch files).

    Tried obtaining the output using SQL and the result is as follows:
    SQL> WITH T AS
      2  (
      3  SELECT 1 COL1 FROM DUAL
      4  UNION
      5  SELECT 2 COL1 FROM DUAL
      6  UNION
      7  SELECT 3 COL1 FROM DUAL
      8  UNION
      9  SELECT 4 COL1 FROM DUAL
    10  UNION
    11  SELECT 5 COL1 FROM DUAL
    12  UNION
    13  SELECT 8 COL1 FROM DUAL
    14  UNION
    15  SELECT 9 COL1 FROM DUAL
    16  UNION
    17  SELECT 10 COL1 FROM DUAL
    18  UNION
    19  SELECT 13 COL1 FROM DUAL
    20  UNION
    21  SELECT 14 COL1 FROM DUAL
    22  UNION
    23  SELECT 15 COL1 FROM DUAL
    24  UNION
    25  SELECT 16 COL1 FROM DUAL
    26  UNION
    27  SELECT 23 COL1 FROM DUAL
    28  UNION
    29  SELECT 24 COL1 FROM DUAL
    30  )
    31  SELECT OUTPUT FROM
    32  (
    33  SELECT DECODE(COL3,NULL,COL1, COL2)  || '-' || LEAD(DECODE(COL3,NULL,COL3, COL1)) OVER (ORDER BY DECODE(COL3,NULL,COL1, COL2)) OUTPUT  FROM
    34  (
    35  SELECT COL1, LEAD(COL1) OVER (ORDER BY COL1) COL2, LAG(COL1) OVER (ORDER BY COL1) COL3 FROM T
    36  )
    37  WHERE
    38  (COL2 - COL1 > 1 OR COL2 IS NULL OR COL3 IS NULL)
    39  )
    40  WHERE OUTPUT != '-';
    OUTPUT                                                                         
    1-5                                                                            
    8-10                                                                           
    13-16                                                                          
    23-24

  • Help Please On Classes

    Can any one help me out in how to grant rights on classes to different schamas.
    Your Help will be highly appericiated.
    Chandan

    See if this makes a bit more sense
    class Employee
      String name;
      double sales;
      double commission;
      public Employee(String pName, double pSales)
        name = pName;
        sales = pSales;
        commission = new ComputeCommission().calculate(sales);
        System.out.println("Name = "+name+"\nSales = "+sales+"\nCommission = "+commission);
        System.exit(0);
      public static void main(String[] args){new Employee("Fred Smith",10000.00);}
    class ComputeCommission
      public double calculate(double salesMade)
        return salesMade * .05;
    }

  • 5.0.1 Firefox, application froze then crashed. Restarted it, but no 'restore session' and i've lost all my tabs. Help please?!?!

    Can anyone help please?
    5.0.1 Firefox, application froze then crashed. Restarted it, but no 'restore session' and i've lost all my tabs. Help please?!?!
    Done config:restoresession, and nothing.

    There shouldn't be any numbered sessionstore-##.js in the Firefox Profile Folder
    *http://kb.mozillazine.org/Profile_folder_-_Firefox
    The presence of such files usually indicates that that was a problem with accessing the main sessionstore.js file that prevented Firefox from renaming the temp file with the number.<br />
    In this case you may be lucky that the file with the highest number may have that session.<br />
    You can try to rename the file sessionstore-3.js to sessionstore.js to see if that brings back the lost tabs.
    If you use the Time Machine then you can try to restore a copy of sessionstore.js from around the time that you lost that session.

  • Is it save to use class variables in a stateful application module?

    I've a simple question of understanding: Can I savely use class-variables in stateful application modules?
    Consider the following example:
    public class myStateFullAppModuleImpl extends ApplicationModuleImpl
    private int myVar=0;
    public int doMyWork()
    myVar++;
    return myVar;
    Is it save to use "myVar" this way considering AM-pooling? Or should I save "myVar" in the session instead?
    Thanks

    Remainder of code:
                for (int i=0; i < length; i++)
                   org.w3c.dom.Node child = nl.item(i);
                   if (child != null && "jbo.counter".equals(child.getNodeName()))
                      getSession().getUserData().put(
                         "jbo.counter", child.getFirstChild().getNodeValue());
                      int counterInt = getCounterValue();
                      counterInt++;
                      getSession().getUserData().put(
                         "jbo.counter", String.valueOf(counterInt));
                      break;
          public void prepareSession(oracle.jbo.Session session)
             super.prepareSession(session);
             try
                int counterInt = getCounterValue();
                counterInt++;
                getSession().getUserData().put("jbo.counter", String.valueOf(counter
    Int));
             catch (Exception e)
                e.printStackTrace();
          public int getCounterValue()
             int counterInt = 0;
             try
                String counter = (String)getSession().getUserData().get("jbo.counter[i][pre]Long postings are being truncated to ~1 kB at this time.

  • Loading a JPEG into a swing application...

    I need help embedding a JPEG in a swing application(preferrably in it's own container). What should container should I use? Any helpful methods?

    Swing related questions should be posted in the Swing forum.
    Read the Swing tutorial on [url http://java.sun.com/docs/books/tutorial/uiswing/components/icon.html]How to Use Icons.

  • Unicode characters with accents won't display in Java Swing applications

    I'm using FreeMind (a Java Swing application) and I need to enter classical Greek characters with accent marks. When I type an accented Greek character, FreeMind displays the unaccented character. However, I can type the accented character in MS Word, then copy and paste into FreeMind, the accented character appears.
    One of the FreeMind developers indicated this was a Java Swing issue, not FreeMind, and suggested I test with another Swing application. So, I installed jEdit and got exactly the same results. I can paste an accented character into jEdit, but I cannot type it in directly.
    I'm using Windows Vista with Java 6 Update 22 (build 1.6.0_22-b04). I also tested on a XP Pro box with Java 1.6.0_18-b07 and got the same result.
    One other note: A couple days ago, I was able to type accented Greek characters into FreeMind. But it only worked for a couple days and then the behavior reverted to unaccented characters. It is possible, but I don't recall specifically, that I updated Java during the time and that may indicate a bug in one version of Java but not another.
    Any assistance or guidance would be greatly appreciated!
    Darin

    Walter,
    The link you provided does not appear to describe the Greek Polytonic keyboard. (The page also describes using the "Option" key as the dead key. There is no "Option" key on my keyboard. I'm using a Sony VGN-NS140E purchased in Chicago, i.e. standard physical US keyboard.)
    Please see http://darindavis.net/languages/keyboard_Greek.pdf for a detailed description of how to use the Greek (Polytonic) keyboard in Windows to produce a complete set of accented classical Greek characters. This method works in MS Word and Notepad. I enabled the Greek (Polytonic) keyboard with:
    Windows (Vista) Start > Control Panel > Regional and Language Options > Change Keyboards > General > Add > Greek (Greece) > Greek Polytonic
    A test that will demonstrate whether you can replicate the error is to do the following in both MS Word (or Notepad) and jEdit (or FreeMind):
    1. Enable the Greek Polytonic keyboard
    2. Type "\" then "e" which should produce an epsilon with smooth breathing and grave accent (ἒ)
    When I do this in MS Word or Notepad, I see the epsilon with smooth breathing and grave accent. When I do this in jEdit and FreeMind, I only see an epsilon.
    I recorded a screencast to illustrate the problem: http://www.screencast.com/t/TRKkKQrCgbN
    Actually, this problem is transient. Sometimes FreeMind or jEdit will display accented characters, other times it won't. Ironically, the first time I recorded the above referenced screencast, a few characters in jEdit did appear with accents. A couple minutes later, I re-recorded the screencast and as you can see jEdit did not display the accents. Between the two recordings I literally did nothing other than stop the Jing recording and start a new one. There is another variable at play here and I can't determine what it is. The most likely source seems to be Java since MS Word and Notepad consistently display accent characters.
    Thanks,
    Darin

Maybe you are looking for