Method paint and DVBTextLayoutMAnager

Its good idea use method paint when i'm using DVBTextLayoutMAnager??
Thanks a lot

Two answers to that:
1) JVM calls paint on its own whenever it detects a need to redraw the screen. This can occur when something is added to it, when a frame is partially covered, moved, resized, etc...
2) paint can sometimes be called programmatically using the repaint() method. This is preferable to calling paint because it finds the correct Graphics object and makes sure that everything that needs a repaint gets its paint method called...
Steve

Similar Messages

  • Why dont we call method paint?? and declare it instead

    usually i have seen from previous examplies in my bok that we declare methods somewhere and then we call them sending arguments but in case of paint i saw only declaration as follows
    public void paint(Graphics g){
    after declaring why is there no code like this:paint(g1);
    why no call and still paint does the work .its confusing

    Two answers to that:
    1) JVM calls paint on its own whenever it detects a need to redraw the screen. This can occur when something is added to it, when a frame is partially covered, moved, resized, etc...
    2) paint can sometimes be called programmatically using the repaint() method. This is preferable to calling paint because it finds the correct Graphics object and makes sure that everything that needs a repaint gets its paint method called...
    Steve

  • Screen Painter and SDK

    Hi,
    I've developed a form in the screen painter. I want to add the business logic from SDK. Is it possible...it should be right?
    I have a very complex form with around 20-25 edit boxes and one grid. The issues
    I have designed the form in the screen painter and am trying to access the edit boxes from SDK. the code snippets is like
    oForm = SBO_Application.Forms.GetFormByTypeAndCount("60004", 0)
    When i try to access it says form not found. sbo_appl.forms.activeform worked, but when i used
    oEdit = oForm.Items.Item("9").Specific
    in the next line, it says 9 is not a valid feild.

    Yes - this is what SP is about. You design your screen
    from SP and save it as an XML file. At this point you
    load it in B1 from your addon using the LoadBatchAction.
    You just need to change the FormID before loading it, this
    is an easy task: if you want some sample you can see the
    samples here in SDN or check the code of B1DE here on SDN
    too.
    Once it is loaded you can use all the UI SDK methods and
    properties to handle events and items in this form.

  • Painting and using different Layers

    Hi,
    I have to develop a Swing interface where i have to do lot of painting,
    Like there will be a background which will be showing some strips with different colors, which will be stable,
    On this background I have to draw some rectangle , off different size,
    and add the function so the user can click on the rectangle and drag it and drop it
    I have to develop a kind of scheduling , like microsoft scheduler or take a look at the following example
    http://www.ilog.com/products/jviews/demos/activitychart/index.cfm
    I need some help in finding some tutorial on how to use different panes in JApplet , like th layered panes, the glass panes etc
    Any advice on developing such an Applet
    Ashish

    Hi Shannon,
    I already have subclassed JPanel and override the paintComponent method to do all the painting , but the problem i am having is there is a lot of painting and when ever i move the mouse over it repaint method is called and so there is chance that the applet will not work if the graphics card of the user is not good,
    Can u point me to some example where a RepaintManager() is used,
    also i want to use layers so i can avoid the repainting of the background even if the user clicks on it, or drap and drops the rectangle drawn
    Ashish

  • What's the difference between paint and paintComponent?

    can any body tell me the difference between paint and paintComponent?and when i should use paint and when use paintComponent?
    I know that when I use repaint,it will clear all the objects and then paint again?
    is there a method similar to repaint?
    thanks in advance!

    and when i should use paint and when use paintComponent?Simple answer:
    a) override paint() when doing custom painting on an AWT component
    b) override paintComponent() when doing custom painting on a Swing component
    Detailed answer:
    Read the article on [url http://java.sun.com/products/jfc/tsc/articles/painting/index.html]Painting in AWT and Swing.
    Read the Swing tutorial on [url http://java.sun.com/docs/books/tutorial/uiswing/14painting/index.html]Custom Painting.

  • How do i Call an a method on and object that is a parameter

    I have thee code as below.
    I want to call the method setValue and set the value and pass it a String. i want it called on the jobject param1.
    What do i need to call todo that given the below code.
    JNIEXPORT jobject JNICALL
    Java_PassObjectAndDoSomething_nativeMethod(JNIEnv *env, jobject obj, jobject param1) {
        jstring jstr;
        jclass cls2 = (*env)->GetObjectClass(env, param1);
        jmethodID mid3 = (*env)->GetMethodID(env, cls2, "setValue", "(Ljava/lang/String;)V");
        if (mid3 == NULL) {
            return NULL;
        jstr = (*env)->NewStringUTF(env, "My brand new JString");
        if (jstr == NULL) {
             return NULL;
        /*This causes errors when called*/
        (*env)->CallObjectMethod(*env, param1, mid3, jstr);
        return param1;
    }

    daniel_p wrote:
    /*This causes errors when called*/Presumably you mean a system exception and not java exception of some sort.
    (*env)->CallObjectMethod(*env, param1, mid3, jstr);Why is the asterisk in front of the env parameter in CallObjectMethod()?
    return param1;Since you passed that in it is obviously pointless to return it. But that has nothing to do with your problem.

  • I have Photoshop CS6 Extended Students and Teachers Edition.  When I go into the Filter/Oil paint and try to use Oil paint a notice comes up "This feature requires graphics processor acceleration.  Please check Performance Preferences and verify that "Use

    I have Photoshop CS6 Extended Students and Teachers Edition.  when I go into the Filter/Oil paint and try to use Oil Paint a notice comes up "This feature requires graphics processor acceleration.  Please Check Performance Preferences and verify that "Use Graphics Processor" is enabled.  When I go into Performance Preferences I get a notice "No GPU available with Photoshop Standard.  Is there any way I can add this feature to my Photoshop either by purchasing an addition or downloading something?

    Does you display adapter have a supported  GPU with at least 512MB of Vram? And do you have the latest device drivers install with Open GL support.  Use CS6 menu Help>System Info... use its copy button and paste the information in here.

  • Can we call a method before and after Export operations in ADF 11g

    Hi,
    My problem is I have to execute a method before and after the export operation.Is this posible in ADF 11g
    Regards,
    Felix

    Hi,
    in response to a similatr post of yours, I replied
    1. Drop af:exportCollectionActionListener on a command button
    2. set the command button to display = false
    3. In your Java code, call
    ActionEvent ae = new ActionEvent(button);
    ae.queue();
    Everything you put before
    ActionEvent ae = new ActionEvent(button);
    ae.queue();
    will fires as a pre-trigger, everything after as a post trigger
    Frank

  • What is the different between payment methods Wire and EFT

    Hi All
    can anybody tell me What is the different between payment methods Wire and EFT ?
    Regards ;

    WIRE:
    Wire is transfer of amount due directly to the supplier's bank it is an electronic transfer of funds
    This mode of payment is used for international suppliers.
    It can be paid in foreign currency or USD.
    Wire payments are same day payments.
    EFT:
    EFT ensures funds transfer from one bank account to another using electronic links.
    Can be used to make payments into domestic banks (within US) in USD only.
    It is faster than check payments.
    Hope this helps.

  • IDOCs not created for Payment method "P" and "B"

    Dear Experts,
    I have executed the Automatic Payment program for three payment methods (P,V and B - Foreign Currency) in one Run ID. Payment run was successful but it has created IDOCs for the documents / Vendors attached with payment method "V" but IDOCs were not created for the payment methods "P" and "B". I have checked the configuration relating to payment methods and those were assigned with Form details and the maximum amount is also defined in the payment methods.
    Can any one suggest me where I had made the mistake / where I need to check the configuration settings.
    Thanks a lot.
    Regards,
    Ramnath.

    Hi Surya,
    Please find below error log created while executing the Payment run for the issue.
    Step 002 started (program SAPFPAYM_SCHEDULE, variant &0000000116195, user ID V-PIZHA)
    Step 003 started (program RFFOEDI1, variant &0000003957078, user ID V-PIZHA)
    Maintain an output device in your user master record
    Job cancelled
    Thanks and Regards,
    Ramnath,
    SAP FIMM Team

  • Difference between narrow() method usage and simple class cast for EJB

    Hi,
    I have a very simple question:
    what is the difference between PortableRemoteObject.narrow(fromObj,
    toClass) method usage and simple class cast for EJB.
    For example,
    1)
    EJBObject ejbObj;
    // somewhere in the code the home.create() called for bean ...
    ABean a = (ABean)PortableRemoteObject.narrow(ejbObj,ABean.class);
    OR
    2)
    EJBObject bean;
    // somewhere in the code the home.create() called for bean ...
    ABean a = (ABean)ejbObj;
    Which one is better?
    P.S. I'm working with WL 6.1 sp2
    Any help would be appreciated.
    Thanks in advance,
    Orly

    [email protected] (Orly) writes:
    Hi,
    I have a very simple question:
    what is the difference between PortableRemoteObject.narrow(fromObj,
    toClass) method usage and simple class cast for EJB.
    For example,
    1)
    EJBObject ejbObj;
    // somewhere in the code the home.create() called for bean ...
    ABean a = (ABean)PortableRemoteObject.narrow(ejbObj,ABean.class);
    OR
    2)
    EJBObject bean;
    // somewhere in the code the home.create() called for bean ...
    ABean a = (ABean)ejbObj;
    Which one is better?(1) is mandated by the spec. It is required because CORBA systems may
    not have sufficient type information available to do a simple case.
    P.S. I'm working with WL 6.1 sp2 You should always use PRO.narrow()
    andy

  • Method post and encrypt problem--FORM

    Hello,
    In the form I have some text fields and one field which takes input as file.
    Now I have set method = post and enctype="multipart/form-data" for a form.
    Now when I submit the form the input = text fields are shown as null since I am using enctype="multipart/form-data".
    I have to use enctype="multipart/form-data" since I have to send a file.
    I dont understand how to solve this problem.
    Thanks
    Aniketh

    I am using the same library for file upload.
    There are some input type as text and one input type as file.For input type file I have use enctype="multipart/form-data".
    As I explained above if I use the form parameter enctype="multipart/form-data" only then the file will be uploaded but the other text inputs (which I read as request.getParameter("name"))comes out to be null.
    Please help me out

  • Non-modal JDialog is not painted and blocks the GUI

    I have developed a GUI that's basically a JFrame with a JDesktopPane.
    The user can, via a menu item, pop up a JDialog that contains some JLists and then select some value from it. Once he/she has done the selection and clicks on OK, the dialog disappears (data processing is then done in the main GUI) and comes back once a specific event has happened. The user then selects other data and so on, until he/she clicks on Cancel, which definitely disposes of the JDialog.
    The graphics of the JDialog are build in the class constructor, which does a pack() but does not make the dialog visible yet. The dialog appears only when doSelection() is called.
         /** Called the first time when user selects the menu item, and then
         when a specific event has happened. */
         public Data[] doSelection() {
              dialog.setVisible(true);
              // ... Code that reacts to user's input. Basically, the ActionListener
              // added to the buttons retrieves the user's selection and calls
              // dialog.setVisible(false) if OK is clicked, or calls dialog.dispose()
              // if Cancel is clicked.
         }Now, everything works fine if the JDialog is modal, but if I make it non-modal only the window decorations of the JDialog are painted, and the control doesn't return to the main GUI. Calling doLayout() or repaint() on the doSelection() has no effect. How can this be fixed?
    I hope I have been able to explain the problem satisfactorily, I could not create a suitable SSCCEE to show you. Thanks in advance for any hint.

    Ok, I've taken some time to think about this problem and I've modified the code a bit.
    Now the dialog shows itself and is responsive (i.e. its JLists can be operated), but the Ok button does not close the dialog as I'd want. I believe that I'm messing up things about threading, and the operations in actionPerformed() should be carried out in another thread, if possible.
    Thanks in advance for any hint / suggestion / comment / insult.
         private Data[] selection;
         /** Constructor */
         public MyDialog() {
              // ... Here is the code that builds the dialog...
              dialog.setModal(false);
              dialog.pack();
              // Note that the dialog is not visible yet
         public Data[] doSelection() {
              operatorAnswer = NONE_YET;
              dialog.setVisible(true);          
              while (operatorAnswer == NONE_YET) {
                   try {
                        wait();
                   } catch (InterruptedException e) { }
              return (operatorAnswer == OK ? selection : null);
         public void actionPerformed(ActionEvent evt) {
              if (okButton.equals(evt.getSource())) {
                   operatorAnswer = OK;
                   retrieveSelection();
                   dialog.setVisible(false);
              else if (cancelButton.equals(evt.getSource())) {               
                   operatorAnswer = CANCEL;
                   dialog.dispose();
         private void retrieveSelection() {
              // ... Here is the code that retrieves selected data from the dialog's JLists
              // and stores it in the "selection" private array...
              notifyAll();
         }

  • Non-static method paint cannot be referenced from static context

    i cant seem to figure out this error dealing method paint:
    public class TemplateCanvas extends Canvas implements Runnable {
        //static
        public static final int STATE_IDLE      = 0;
        public static final int STATE_ACTIVE    = 1;
        public static final int STATE_DONE      = 2;
        private int     width;
        private int     height;
        private Font    font;
        private Command start;   
        private int state;
        private String message;
        public TemplateCanvas() {
            width = getWidth();
            height = getHeight();       
            font = Font.getDefaultFont();
            //// set up a command button to start network fetch
            start = new Command("Start", Command.SCREEN, 1);
            addCommand(start);
        public void paint(Graphics g) {
            g.setColor(0xffffff);
            g.fillRect(0, 0, width, height);
            g.setColor(0);
            g.setFont(font);
            if (state == STATE_ACTIVE) {
                Animation.paint(g);
            } else if (state == STATE_DONE) {
                g.drawString(message, width >> 1, height >> 1, Graphics.TOP | Graphics.HCENTER);
        public void commandAction(Command c, Displayable d) {
            if (c == start) {
                removeCommand(start);
                //// start fetching in a new thread
                Thread t = new Thread(this);
                t.start();
        public void run() {
            state = STATE_ACTIVE;
            //// start network fetch
            Network network = new Network();
            network.start();
            //// start busy animation
            Animation anim = new Animation(this);
            anim.start();
            //// wait for network to finish
            synchronized (network) {
                try {
                    wait();
                } catch (InterruptedException ie) { }
            //// end animation
            anim.end();
            //// get message from network
            message = network.getResult();
            //// repaint message
            state = STATE_DONE;
            repaint();
    }TemplateCanvas.java:38: non-static method paint(javax.microedition.lcdui.Graphics) cannot be referenced from a static context

    Animation.paint(g); paint() is not a static method. That means you have to call it on an instance of an Animation class (an object), not on the class itself. This is designed this way because the paint() method uses variables that have to be instantiated, so if you don't have an instance to use, it can't access the variables it needs. Static methods don't use instance variables, they only use what's passed in to them, so they don't need to be called on an object. Hope that was clear.

  • I was in America and you ship over Amercan store now I went to Egypt transformed from Amircan Store to Egypt Store remains the payment method dollar and of possible action Director of through Cards iTunes you if introduced Carte iTunes on your Director of

    I was in America and you ship over Amercan store now I went to Egypt transformed from Amircan Store to Egypt Store remains the payment method dollar and of possible action Director of through Cards iTunes you if introduced Carte iTunes on your Director of ship dollar or is it to Amarcain only Even if there was a deal in dollars and there is the Director of word I want to answer quickly and thank you.   Ihave reedem word

    I'm not entirely sure what your post means. Whether gift cards will become available in Egypt I don't know, I'm just a fellow user, I don't know what Apple might or might not be planning. But as I said, gift cards are country-specific.
    If you are in Egypt then you can only use the Egyptian store. From the US iTunes store terms of use (and other country's stores will be similar) :
    The iTunes Service is available to you only in the United States, its territories, and possessions. You agree not to use or attempt to use the iTunes Service from outside these locations. Apple may use technologies to verify your compliance.

Maybe you are looking for

  • Error 403 When Click on "Sign in"

    Our Company has Server with name Like : Sp2010 and their Server has domain like : xxx.Example.com (not www.Example.com) now I created Web application on Port 8080 and then extended to Port 80 for Internet and Intranet then Created Site Collection. De

  • Where can I buy Satellite P500-130?

    I have spent the WHOLE day trying to find a distributor who sells the Satellite P500-130 in Germany ( or with German keyboard). So far no luck. Does anyone know if/where I can buy a new one or if it is an older model, what the follow up model is? Tha

  • Trouble Viewing PDF's in Safari

    When I click on a pdf to read it, I get a black screen and a message  that " ADobe Reader blocked for this website"  If I click on the message, it gives me a window that allows me to Trust the site and then will open the pdf.  It won't allow me to do

  • Cs 4 in hungarian language

    I got a one time exception downloading license and serial number of Design Premium CS 4 from the Adobe Customer Support under the case 212673989 in 03/28/2014 14:40:38. Also I got a link: http://helpx.adobe.com/creative-suite/kb/cs4-product-downloads

  • HOW CAN I REINSTALL LION

    I purchased a used Imac which has OSX Lion installed. The original owner has a password that i can't get. The only discs I have are for 10.6.4 which came with it when new. I would like to do a complete reset back to factory specs but don't know what