How to add more than one paint method

hi everyone
I am doing a project in which i have already created a paint method but i find that there is necessity to create one more
paint method within the same file in which i have a paint method pls tell me how to how to add a paint method how to call the repaint method
please its very urgent

By even suggesting that I can gather you have a horrible design of what ever you are doing--DON'T! And go back and refactor your application so you do not need or even want such a thing to happen.
1 - paint is for use in AWT. If you are using AWT, then very well, you are at least using the right method to override. If you are using SWING, then you are totally messed up before you even arrived at this ill conceived plan of 2 paint methods.
2 - your paint (AWT)/paintComponent (SWING) is a system called method driven by events you haven't any control over. You need to treat it as such.
3 - your painting method should be very tight. I will bet your's is a horrid mess: overstuffed with attempted control and logic processes.
4 - Even if you are using active rendering, your approach to 2 painting methods is horrible at best.
If you need help in designing your process better, then post what you have and ask for help. IMO what you are doing can only lead to ugliness.

Similar Messages

  • More than one paint method?

    Hi
    Im wondering if it is possible to have more than one paint method. It should look something like this.
    public class MyApplet extends JApplet {
    public void paint(Graphics g) { // the normal paint method
    public void SecondPaint(Graphics gr) { // should i name the Graphics
    // to the same as in the normal paint method ( Graphics g) ?
    }And if its possible how would i repaint the other method?
    This is for the normal
    repaint(); and how would i do for the second paint method?
    please write an example program with two paint methods and just write below how to repaint.
    Thanks you som much if you reply

    (sorry to hijack this thread...) Yes, it'swindows,
    but right now my problem isn't even that. It'sjust
    catching and correcting basic c-coding errors.
    Witness my embarrassment in the JNI forum:
    http://forum.java.sun.com/thread.jspa?threadID=5213196
    &tstart=15
    Now if only I lived in "middle-of-no-where"Virginia!
    Nice! ;-)I saw your note about "middle-of-nowhere" Virginia a little too late. And you don't need to live here; my Solaris machine is up and running 24/7 and is open for SSH and XClient. (Also open for telnet, which comes built into windows, I believe.) If you'd like to brush up on Solaris C, C++ and Java development, just let me know. You're more than welcome to use the machine. I have tons of space on the drive and a dedicated connection just to that machine. There is an application for windows called CygwinX which is an XClient for Solaris. You can use that to remotely log into the Solaris desktop. There are about fifteen other people that I let use the machine for various reasons. I host myriad open source projects for development that you're more than welcome to mess around with. Tools available to you would be NetBeans 5.5, Sun Studio (with the Sun C/C++/Fortran compiler - which is beautiful by the way); and the whole suite of GNU compilers. I have the CDE and the JavaDesktop built in. I also have tons of Motif tutorials and demonstrations if you're interested in those. Heads up, though ... XServer tends to run pretty slowly when I have more than about four users logged onto a desktop at once. But like I said, if you (or just about anyone else for that matter) are interested, let me know and I'd be more than glad to set you up.

  • How to add more than one tabular region in a page?...

    How to add more than one tabular region in a page?
    i have a page, that page contain form and tabular region. when i trying to add another tabular region it showing error
    1 error has occurred
    Updatable SQL Query already exists on page 2. You can only add one updatable SQL query per page. Select a different page.
    but i have to add the tabular in that page.
    Is it possible?
    pls help...
    Thanks and regards,
    skud

    hi,
    even i am searching for some thing similar.
    i want to have 3 calendars in one page.
    getting same message calendar already exists on page 2. You can only add one calander per page. Select a different page.
    pls help.

  • How to add more than one input arguments to the tpcall

    Hi
    Can any one know how to add more than one input arguments in the tpcall using WTC (Jatmi)?
    Par example, I have un service Tuxedo getConsoClient(char* cli_id, char* type)
    To call this service, I'm using tpcall("getConsoClient", dataIn, 0);
    here, I did't know how to add two parameters in the TypedBuffer object. I'm new to WTC.
    Any hints will be greatly appreaciated.
    Advanced thanks

    Thanks for you help. But in java Jatmi, I have lot of problem to convert array into TypedBuffer or TypedString. See below code, I'm tried using vector or tableau etc..
    But I have always same erreur. :(
    public void getClientInfo() {
         Context ctx;
         TuxedoConnection myTux;
         TypedString numinst = new TypedString("1");
         TypedString idClient = new TypedString("1003");
         TypedString[] dataIn = {numinst,idClient};
         //TypedString dataIn = new TypedString(numinst+"\0"+idClient+"\0");
         Vector input = new Vector();
         input.add(0,numinst);
         input.add(1,idClient);
         Reply rpy = null;
         try{          
              System.out.println("getClientInfo called : " + dataIn);
              TuxedoConnectionFactory tcf;               
              ctx = new InitialContext();
              tcf = (TuxedoConnectionFactory) ctx.lookup("tuxedo.services.TuxedoConnection");
              myTux = tcf.getTuxedoConnection();          
              System.out.println("About to call tpcall cnx = "+myTux);
              rpy = myTux.tpcall("LireInfoCli_SE",(TypedBuffer)dataIn, 0);          
              System.out.println("tpcall successfull!");
              TypedFML32 typ = (TypedFML32) rpy.getReplyBuffer();
              System.out.println("Reply Type = "+rpy.getReplyBuffer().getType());
              System.out.println("Reply toString = "+typ.toString());
              while(typ.Fiterator().hasNext()){
                   System.out.println("Reply toString = "+typ.Fiterator().next().toString());               
              myTux.tpterm(); // Closing the association with Tuxedo
         }catch (TPReplyException tpx) {
              // Could not get the tuxedo object, throw TPENOENT
              System.out.println("TPReplyException perrno = " + tpx.gettperrno()+" DETAILS "+tpx.gettperrordetail()+" getLocalizedMessage "+tpx.getLocalizedMessage()+" "+tpx.getCause());
              tpx.printStackTrace();
         }catch (TPException tpx1) {
              // Could not get the tuxedo object, throw TPENOENT
              System.out.println("TPReplyException perrno = " + tpx1.gettperrno()+" DETAILS "+tpx1.gettperrordetail()+" getLocalizedMessage "+tpx1.getLocalizedMessage()+" "+tpx1.getCause());
              tpx1.printStackTrace();
         }catch (NamingException ne) {
                   // Could not get the tuxedo object, throw TPENOENT
                   System.out.println("Could not get TuxedoConnectionFactory : " + ne.getMessage());
                   ne.printStackTrace();
         }catch(Exception e){
                   System.out.println("Exception in getClientInfo ->"+e.getMessage());
                   e.printStackTrace();
         return;
    }

  • How to add more than one clip to a drop zone?  New guy

    Hey all, I'm new to DVD studio and I'm trying to fiqure out how to add more than one clip to a Template drop zone. I'm using a 6 button template. I've named each button .. Football, Baseball, Hockey ...etc.
    How can put in MORE THAN ONE CLIP in the Football track/drop zone. So when someone clicks on Football they can see 3 examples.
    Do I need to create something to link to that Football button?
    Any replies appreciated

    You can edit the segments to be used in FCP or Motion so that the asset drop in has three examples
    Another way (if you want) is to make the entire menu outside of DVD SP so that the background layer is an m2v and the items are revealed/masked to some degree
    Take a look towards the bottom of this thread http://discussions.apple.com/thread.jspa?messageID=2951183&#2951183 where I discuss http://www.dvdstepbystep.com/Overmovies.zip
    Note that you can also use a basic overlay to do this. The overlay would be just solid black instead of the arrows/circles things I use in that example.
    For instance make the text one color and the box over the movie another (You can make it blue and the box red lets say) Draw a region over both for the button. Map blue for highlights/transparencies for normall/selected/activated and the same for the Box

  • How to add more than one datafile while creating tablespace

    how to add more than one datafile while creating tablespace. I know by using alter command i can add datafile but i want while creating tablespace

    Hi Dadivela,
    how to add more than one datafile while creating tablespace.Here is the syntax:
    !http://www.dba-oracle.com/images/create_tablespace.jpg!
    I do it like this:
    create tablespace myts
    datafile
    *'/u01/app/oracle/db1.dbf' size 100m,*
    *'/u02/app/oracle/db2.dbf' size 200m;*
    Here are my complete notes:
    http://www.dba-oracle.com/t_tablespace_create_alter.htm
    Hope this answers your question . . .
    Donald K. Burleosn
    Oracle Press author

  • How to add more than one phone number in imessage?

    How to add more than one phone number in imessage?

    If you mean sending to multiple phone numbers, place a comma between the numbers in the "To" box, or select the "+" to use numbers in your Contacts

  • How to add more than one server in emanager

    Hi All,
    In Java CAPS6, If I add more than one domain that is GlassFish server, how can I add these server in emanager. I am able to add only one server in eManager.
    Please let me know if any one knows.
    Thanks & Regards,
    B

    Hi,
    I have the same problem. I succeeded in adding the default domain (on the default port 4848) but when I try to add another domain on a different admin port, the connection cannot be established. Here is the manager log :
    2009-02-18 10:41:23,867 ERROR [http-15000-Processor24] com.stc.emanager.deployment.actions.AddNewServerAction - java.security.PrivilegedActionException: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Bad response: (404Not Found due to Connection Failed. Please check the following: <br>   &nbsp - Server Type is correct. <br>   &nbsp - Server is running. <br>   &nbsp - Hostname and Port number(s) are correct. <br>   &nbsp - Server SSL configuration.
    The manager and appserver are on the same server.
    As someone resolved the problem ?

  • How to add more than one attachment in comment

    All my friends that visit my blog page ask me how can they add attach more than one item in their comments, I do not know how.. though I did suggest them to join all the image/item as one image/item.. that is ok so far, but the outcome is not as beautiful as original.

    Unfortunately only one attachment can be added per comment. Advise your friends to add multiple comments, one for each attachment, or combine the images in a photo editing program and upload as one composite image.

  • How to add more than one button control on import of skin?

    I am importing a skin from photoshop that I customized and exported.  For my particular project I need more than one button type with different sizes, dimensions, colors, etc.  In example the buttons for the navigation are going to be different than buttons to print, or email, and buttons that are bigger for the main custom component also need to be different.  I tried changing the naming convensions in the .PSD file but I can't get it to export more than one button type.  Is there a way to do this? 
    Thanks,
    Ryan

    hi,
    even i am searching for some thing similar.
    i want to have 3 calendars in one page.
    getting same message calendar already exists on page 2. You can only add one calander per page. Select a different page.
    pls help.

  • How to add more than one music track in iphoto slideshow

    how do i add a second music track to a slideshow in iphoto. When I have a slide show longer than one song I'd like to start a second music track rather than repeat the song. Thanks for any help...

    I shortened songs in the playlist by changing the end time but when I select for slideshow in iphoto, it plays the full length????
    I know that feature works with later versions of iPhoto but don't remember it it did with iPhoto 8 and 10.5.8.

  • Nokia 220 - How to add more than one number to con...

    I' ve got Nokia 220 Dual Sim and i can't figure out how to add a few numbers to one contact. Is it even possible? Maybe i should update firmware or something? Because "one contact - one number" is realy awkward for me

    The Nokia 220 Dual SIM is based on the new operating system ‘Nokia Series 30+’ (MediaTek). To get multiple entries per contact, you could go for a ‘Nokia Series 40’ based phone like the Nokia 301 Dual SIM. Alternatively, you go for a ‘Windows Phone’, like the Nokia Lumia 730 (because I do not recommend a GPS eanbled phone without a compass for pedestrian navigation).

  • How to add more than one rows to form, without submitting to database

    Hi!
    I have an updatable report similar to this http://htmldb.oracle.com/pls/otn/f?p=31517:163:3149788972931514::NO
    Now, as much as I'm aware the standard thing is that when I add a row, put in data and then add a nother row, previous data is commited and another row is added.
    I, on the other hand, would like to add as much rows as I need and populate them with data and then submitt all the changes in the end. So the user nows, that when he SAVES data it's submited to db, not in between.
    My form is not standard, it uses SQL, and APEX_ITEM, I even have more updatable reports on one page etc, so I presume, processes like AddRowToTabularForm don't come handy.
    Thanx for any suggestions,
    N.

    user10824271 wrote:
    I, on the other hand, would like to add as much rows as I need and populate them with data and then submitt all the changes in the end. So the user nows, that when he SAVES data it's submited to db, not in between.So you would have a select list for the number of rows?
    Add that X(select list) number of rows, populate rows, then insert?
    Is that how you vision it?
    Did you try this? [Tabular Form Add Rows Using Item | http://htmldb.oracle.com/pls/otn/f?p=31517:209:3291656615866862:ADD:NO:::]
    Edited by: MHolley on Mar 11, 2009 8:53 AM

  • How to add more than one JSP file for a single JSPDYNPage component

    Hello Everyone,
                           I am creating one portal application which involves JSPDYNPage component, while creating this component one JSP file is also created. But i want one more JSP file for my application ...i.e- for the same JSPDYNPage component. can anybody tell me how to create one more JSP for the same component.
    Thanks
    Chetan Deshpande

    Hi Pooja,
                 I tried the way u said, but when i try to create it(i.e- right click on pagelet folder & then new---> other......the way u said.) it asks for JSP file name but finish button is disabled even after entering the JSP file name.....is it that i am doing something wrong....please guide me for this & one more thing it asks for folder name also ...where to store that file....but when i try to enter anything.It doesn't show or doesn't allow me to do so
    Thanks
    Chetan

  • How to add more than one graph to a pivot table??

    Hi,
    I have a report containing product,store,offers per store as dimensions and spending,Buying households as measures.My requirement is to show 'Store' in a section and corresponding report(which contains product,offers of that store,spending and Buying HH) and individual graphs for spending and buying households( 2graphs).I mean if I have 3 stores, I should get 3 sections of stores and each section should contain corresponding report and graphs. The main requirement is that "USER" should able to export or print the whole report at a time.
    I used pivot table to achieve this but I could only show one graph per store but I need two graphs for both spending and Buying HH.Please help me how to achieve.
    Your valuable suggestions are well appreciated!!!

    Hi,
    I have a report containing product,store,offers per store as dimensions and spending,Buying households as measures.My requirement is to show 'Store' in a section and corresponding report(which contains product,offers of that store,spending and Buying HH) and individual graphs for spending and buying households( 2graphs).I mean if I have 3 stores, I should get 3 sections of stores and each section should contain corresponding report and graphs. The main requirement is that "USER" should able to export or print the whole report at a time.
    I used pivot table to achieve this but I could only show one graph per store but I need two graphs for both spending and Buying HH.Please help me how to achieve.
    Your valuable suggestions are well appreciated!!!

Maybe you are looking for

  • Questions on setting up PeopleSoft FIN AP Business Unit for India with TDS

    Hi, Does anyone here have some advice for me on how to handle AP transactions for a business unit set up for India with TDS (withholding) and statutory reporting. We are configuring AP BU for India in our existing database which has other BUs for oth

  • Creating the report in answers

    Hi I have one requirement that is I need to create one report. For this I am having two tables they are 1. Area(DIM) 2. Survey(Fact) using these two tables i need a report the report should be like in area table I am having Area PN CT SN FGN Survey P

  • POPUP LOV

    Hello, Were having a little problem with POPUP LOV. This is what we would like to do, we have a page That has a couple of text boxs with POPUP LOV for each text field, what we would like to do is, let's say we choose a specific division ID in the POP

  • Create application using backend code

    how to create application in excel using java backend code

  • BI Query Designer (PM Related)

    I am looking for an urgent solution to the following challenge. Any help would be appreciated. This is PM related and is based off of order statuses. I need to display system and user statuses (both selectable - one or many) from left to right with t