Triggering event FMRE-CREATED in an infinite loop

Hi guys,
Iu2019m having a big problem in Public Sector Management with Founds Management Government when I create a Found reservation Tcode FMX1.
My problem is the triggering event FMRE-CREATED  (event to start the Workflow) because when the document is created, this event is generated by the system which is fine, but inside on my Workflow I have a task to change the status with FMRE-SetLock, when this method is executed, automatically trigger an event FMRE-CREATED again, so my WF gets in a infinite loop.
How can I tell the system to donu2019t trigger this event when the status is changed?
Thanks a lot
Felipe Uribe.

Hi,
but inside on my Workflow I have a task to change the status with FMRE-SetLock, when this method is executed, automatically trigger an event FMRE-CREATED again, so my WF gets in a infinite loop.
How you changing the status? Check any Function Module or BAPI to change the status.
You have acheive it via Start Condition, check are you getting entry in the Table  SWFREVTLOG for Creation.
If second time creating, check for the entry in the table, if found not allow it.
Regards,
Surjith

Similar Messages

  • Listeners, load a class on startup and creating threads in infinite loop

    This is an identical post to the one I made in the jsp forum. I do this as I know, being a regular here, that there are equally good people(in j2ee web application development) in both these forum, but many of them stick to their particular forums of choice - jsp / servlets.
    I was wondering if there is any means by which I could launch my own class when tomcat starts (in the same jvm).
    1. I need one or more Thread/TimerTask because the requirement is such that the application would have continous data drops (in the form of logs) which has to be picked up, parsed and pushed into a db. Another part of the application reads the data from the db on requests (http) and displays it over the web. The thread has to poll for arrival of new logs and then hand it over to a framework for parsing and inserting the parsed data to a db.
    2. I know that I can possibly use a servlet with a load-on-startup value greater than 1 and code my requirement into the init method. However, using a servlet for a functionality different from servicing http requests has me worried. (valid ?), not to mention the fact that Iam very uneasy about creating threads from within Servlets.
    3. I googled hard and found that I could probably use a tomcat specific context lifecycle listener.
    4. I could also possibly use the servlet api - the ServletContextListener.
    5. I have rejected #2 and settled on either #3 or #4 - the ServletContextListener or Tomcat specific Lifecycle Listener, though the later, as I said binds me to Tomcat (which is ok for me). Are there any other specific (dis)advantages of using either especially when I have to create threads from within them (on context startup)? Other than memory leaks, killing the thread objects & associated resources on context shutdown, is there anything else that I need to watch out for while using threads.
    6. I wonder is there is there a plain startup hook available in tomcat (rather than listeners) - from where I can launch a class that starts a thread in the same jvm as tomcat's ?
    Thanks In Advance,
    Ram.

    Anybody ? Sorry for bumping up.
    Thanks,
    Ram.

  • Mail step in workflow is in infinite loop.

    Dear All,
           I have created a workflow with deadline monitoring feature.In the workflow created,I have defined a mail step in a loop with loop condition priority = 8 and three minute for deadline.When the workflow gets triggered , the mail step is in infinite loop and as a result the recipient is receiving the mail every three minutes once.
          Now I want to stop the workflow from infinite loop.Please provide me the solution for which I will be grateful.
    Thanks and regards,
    Pari

    Maybe you should check the thread you created unde the user Vijay Kumar [here.|need to kill the dead line menotoring;
    Regards,
    Martin
    Edited by: Martin Nooteboom on Jul 7, 2008 3:43 PM
    I see Mike also noticed and locked the other thread. Thanks Mike.

  • How to call pragma autonomus_transation in repeated triggering event

    How to call pragma autonomus_transation in repeated triggering event
    eg :
    create or replace trigger trg_1
    after insert on aa
    for each row
    declare
    PRAGMA AUTONOMOUS_TRANSACTION;
    begin
    insert into aa values(10);
    end;
    insert into aa values(20); ..... can u help me pl

    Welcome to the forum.
    How to call pragma autonomus_transation in repeated triggering event You don't, unless you want to corrupt your data.
    Read:
    http://asktom.oracle.com/pls/asktom/ASKTOM.download_file?p_file=6551198119097816936
    http://www.oracle-base.com/articles/9i/MutatingTableExceptions.php
    http://www.oracle-base.com/articles/misc/AutonomousTransactions.php

  • Quick Migrate Creates a Trigger with Infinite Loop

    Quick Migrate did a good job at nicely converting my MS SQL Database to Oracle. The only problem that I have is triggers. I have a table with the companies and when the table is just created and there are no rows in the table, on the very first insert it goes into a constant loop. There is no code I have altered after the migration has been completed.
    So, there is:
    table: RA_COMPANY
    sequence: SEQ_RA_COMPANY_ID
    trigger: TRG_RA_COMPANY_ID
    table has no rows, trigger has been compiled and sequence hasn't been accessed so on the first insert, the trigger should put 1 into the newly added row. Here is the migration code for the trigger:
    CREATE OR REPLACE TRIGGER TRG_RA_COMPANY_ID BEFORE INSERT OR UPDATE ON RA_COMPANY
    FOR EACH ROW
    DECLARE
    v_newVal NUMBER(12) := 0;
    v_incval NUMBER(12) := 0;
    BEGIN
      IF INSERTING AND :new.ID IS NULL THEN
        SELECT SEQ_RA_COMPANY_ID.NEXTVAL INTO v_newVal FROM DUAL;
        -- If this is the first time this table have been inserted into (sequence == 1)
        IF v_newVal = 1 THEN
          --get the max indentity value from the table
          SELECT max(ID) INTO v_newVal FROM RA_COMPANY;
          v_newVal := v_newVal + 1;
          --set the sequence to that value
          LOOP
               EXIT WHEN v_incval>=v_newVal;
               SELECT SEQ_RA_COMPANY_ID.nextval INTO v_incval FROM dual;
          END LOOP;
        END IF;
       -- assign the value from the sequence to emulate the identity column
       :new.ID := v_newVal;
      END IF;
    END;
    ALTER TRIGGER TRG_RA_COMPANY_ID ENABLE;
    /and on the first insert, the loop that is in the middle will be an infinite loop.
    I do need only the inserts and I removed the UPDATE part and the loop itself but I am just wondering why is migration process creating this loop.
    thanks

    Hi Tridy,
    I look into this for you.
    I can see that this line
    SELECT max(ID) INTO v_newVal FROM RA_COMPANY;
    Is going to cause an issue if there are no rows.
    I wonder if
    SELECT NVL(max(ID),0) INTO v_newVal FROM RA_COMPANY;
    Solve the issue?
    Ill do some tests latter today and get back to you.
    Regards,
    Dermot.

  • Infinite loop creating new page due to column header overflow.

    i am getting an error and some pages "Infinite loop creating new page due to column header overflow. " --
    using report builder 9, i have a fairly simple report - that contains 4 subreports.
    for some pages i get the error - it seems if there is more data than would fit on 1 page.
    smaller pages work fine.
    the subreports are all simple queries and dumps....
    containing page header, column header, detail sections.
    page header has just a text bar of the name of the section.
    column header has the field names
    detail section has the data - 1 row for each row in the recordset.
    nothing i do seems to change getting "Infinite loop creating new page due to column header overflow. " on a page with more than 15-20 records returned.
    any ideas would be appreciated.

    Try these links if you are still having the issue:
    http://community.jaspersoft.com/questions/543302/receive-infinite-loop-creating-new-page-d ue-column-header-overflow-exception
    http://community.jaspersoft.com/questions/500177/infinite-loop-due-page-header-overflow

  • Workflow event bus1022-created triggered twice with ME21Nu200F

    Hi everybody
    The explanation to my problem is as follow: Initially I was using the Tcode AS01, ME21N, ABUMN to create fixed assets and every asset created triggers the event BUS1022-CREATED, but then I set the system to synchronizing assets with equipments (SPRO -> Financial accounting->Assets accounting->Master Data->Automatic creation of equipment master recordsu2026u2026) but the event BUS1022-CREATED didn´t triggered any more so I create the new entry in SWEC with ANLA as objet of modification and the OBJ BUS1022 and the event CREATED for the creation for any new record; It works but now the problem is that this event  is being created twice with the Tcode ME21N.
    Any suggestion?
    Thanks a lot.
    Felipe Uribe

    Hello Felipe,
    a check on the TCode during the event coupling seems to be the most effective way here. However, only checking on sy-tcode will not help you much, as you don't know the source (change document / application event).
    So what you need to round up your work-around is a flag in the event container that tells you, if the event was created through the SWEC, and if yes, by which transaction code.
    - To do so, create a subtype of BUS1022 with a system wide delegation.
    - Create two new additional event parameters: TransactionCode  (type syst-tcode) and ByChangeDocument  (type boole-boole)
    - Create a function module Z_SWEC_CONTAINER_BUS1022 copied from SWE_CD_TEMPLATE_CONTAINER_FB (or SWE_CD_TEMPLATE_CONTAINER_FB_2 depending on your ABAP OO experiences) and enter this function module under "Event container" in the maintenance entry of SWEC/BUS1022/CREATED
    - Within that event container function module, you just set the two event container elements using the value of SY-TCODE for the field TransactionCode and a fixed 'X' for the value of the field ByChangeDocument
    - Create a new check function module (or workflow start condition) -- as described earlier in this thread -- that checks on:
    ( ByChangeDocument = 'X' AND TransactionCode = 'ME21N' ) OR ( ByChangeDocument = ' ' ).
    This way you'll sort out the doubled events through the change document for all other transactions than ME21N.
    Good luck,
    Florin

  • ICal in infinite loop adding events

    I have truthfully never had much use for Ical.  I have found it's functionality, look and feel sadly lacking with other programs.
    However, I now have ICAL in what appears to be an infinite loop of trying to add new events.   I suspect it has something to do with a link to Google Calendar.
    I have nothing of value on ICal and I want to start over from scratch.
    How to do?
    OS X LION 10.7.5
    Macbook Pro. Early 2008

    Further investigation looks like it's adding every event ever from MEETUP.   Still want to NUKE iCAL and start ALL OVER>
    Thanks in advance for the assistance.
    Chuck

  • Events firing in infinite loop

    Hello,
    I have two date fields (a start date and a due date) and a text field for the user to enter a duration between the two dates.  I've added separate event listeners for each component and the problem I'm having is when one field is updated, the event listener calculates the date for the other one as well and when the value changes, its event listener fires and changes the other date, causing an infinite loop.
    I've tried to remove the event listeners on the other components at the beginning of the listeners and adding them back at the end of the listeners, but the events still seem to fire when adding the listener.
    Is there an easy way to prevent event handlers from being run when you are changing one component's value from the event listener of another component?

    Try calling validateNow() on the controls before reattaching listeners
    Alex Harui
    Flex SDK Developer
    Adobe Systems Inc.
    Blog: http://blogs.adobe.com/aharui

  • How to create an infinite loop that cannot be cancelled?

    Hi , im new around java and i need a program that keeps on repeating after each each input/uses(generally meant for different user) and cannot either stop using "Cancel" or "x" while stopping only using the "stop" button
    I got a few lines of codes that look like this : String arg = "";
    do{
    JOptionPane.showInputDialog("hi");
    }while ( arg != "y" || arg!= "Y");
    and it cannot be stop with both cancel and"x"(which i wanted)
    but when i used this logic with
    Valid validUserInput = new Valid();
    do {
    userInput = validUserInput.validUserInput(a);
    switch(userInput){
    case 1 : validUserInput.optionOne(b);break;
    case 2 : validUserInput.optionTwo(c);break;
    case 3 : validUserInput.optionThree(d,e);break;
    default : validUserInput.validUserInput(f);
    }while(looping != "" || looping != " ");
    it does not really work(while it will keep looping, it can be easily stop by pressing cancelled or "x")
    So is there any logic or method that can prevent the program from being stop?
    Thankyou!

    elricscript wrote:
    "That is helpful. It gives him a direction where he can focus his research. Namely, 'how to run a program in kiosk mode' rather than 'how to create an infinite loop that cannot be cancelled.'"
    No... He already mentioned he wants to "e.g Interactive kiosk", so saying "properly kiosk it" isn't adding any new information. Rather it's just giving the person a dead point of: you're doing it wrong. Pointing out someone is wrong is not a positive enlightenment. Pointing someone in the right direction is more productive.
    >"That is helpful. It gives him a direction where he can focus his research. Namely, 'how to run a program in kiosk mode' rather than 'how to create an infinite loop that cannot be cancelled.'"
    No... He already mentioned he wants to "e.g Interactive kiosk", so saying "properly kiosk it" isn't adding any new information.
    Yes it is. He asked how to do it using some Swing trickery, and I said it won't work. Which is true. The OP didn't already know that, clearly, hence the question. Now he does. That's pretty much new information if you ask me.
    Rather it's just giving the person a dead point of: you're doing it wrong.Right. He is. However, the problem is now no longer related to Java, and not something I can help him with. You should try that: not answering questions you don't know the answer to. It's actually more helpful than posting misleading, wrong answers.
    Pointing out someone is wrong is not a positive enlightenment. I'm giving basic technical help, not yoga lessons.
    Pointing someone in the right direction is more productive.As already stated, I am as ignorant of how to make a Java application into a kiosk app as the OP is. What value can I add in light of that information? I began by answering a question that was not stated to be about kiosks. Once the question moved outside of my area of knowledge, I stopped trying to answer.
    I notice you're not giving him any help, being more interested in admonishing others as you are.

  • [svn:osmf:] 14765: Put gate around autoRewind code, to prevent possibility of an infinite loop ( which could happen if you create a SerialElement with the last child a DurationElement of duration zero ).

    Revision: 14765
    Revision: 14765
    Author:   [email protected]
    Date:     2010-03-15 13:48:04 -0700 (Mon, 15 Mar 2010)
    Log Message:
    Put gate around autoRewind code, to prevent possibility of an infinite loop (which could happen if you create a SerialElement with the last child a DurationElement of duration zero).
    Modified Paths:
        osmf/trunk/framework/OSMF/org/osmf/media/MediaPlayer.as

    Step by step, how did you arrive at seeing this agreement?

  • ActionEvent/Setting gui text in an infinite loop

    Hi,
    I have set up a gui that contains ~ 100 JTextFields and one JTextButton
    Pressing the JTextButton on the gui triggers an action event that
    1.     establishes a socket connection w/ a server
    2.     reads input from the server in an infinite loop
    3.     should use the server data to dynamically setText in the various JTextFields found on the gui.
    for example, during one iteration of the infinite loop, the data may set the text of JTextField #1 to ?foo? and in a later iteration of the loop, the new data from the input stream may set the text of the same field to something else (e.g. ?bar?). Thus, the gui should show a dynamically changing collection of TextFields after the user presses the JTextButton.
    Problem: because of the infinite loop, NONE of the fields is ever updated (see pseudocode below). If I remove the infinite loop and simply have 1 iteration of the block of code within the actionPerformed method, the gui updates properly.
    How might I alter the code to a) maintain the server connection, b) continuously read from the input stream and c) have a dynamic update of the textfields w/in the gui?
    I've tried adding "this.paint(this.getGraphics());" within the infinite loop and it sort of works, but the updates to the gui are FAR SLOWER than the data that are streaming in from the server.
    Thanks for any help!
    The code looks something like this
    Public class abc extends JFrame
    Public abc()
         {initialize components}
    instantiate all textfields & button
    create various arrays
    public void initialize components
         (set up gui using gridbaglayout
         add actionListener to button)
    private actionperformed
    (establish socket connection w/ server
         read data from server in an infinite loop
         parse data and use information to setText on the gui)
    public static void main(blah blah)
         show abc();

    have the reading loop in a different class which will have its own Thread running aside from the main program's thread. This way your application will do both at once :)

  • Infinite loop error after using Java Sun Tutorial for Learning Swing

    I have been attempting to create a GUI following Sun's learning swing by example (example two): http://java.sun.com/docs/books/tutorial/uiswing/learn/example2.html
    In particular, the following lines were used almost word-for-word to avoid a non-static method call problem:
    SwingApplication app = new SwingApplication();
    Component contents = app.createComponents();
    frame.getContentPane().add(contents, BorderLayout.CENTER);I believe that I am accidentally creating a new instance of the gui class repeatedly (since it shows new GUI's constantly and then crashes my computer), possibly because I am creating an instance in the main class, but creating another instance in the GUI itself. I am not sure how to avoid this, given that the tutorials I have seen do not deal with having a main class as well as the GUI. I have googled (a nice new verb) this problem and have been through the rest of the swing by example tutorials, although I am sure I am simply missing a website that details this problem. Any pointers on websites to study to avoid this problem would be appreciated.
    Thanks for your time-
    Danielle
    /** GUI for MicroMerger program
    * Created July/06 at IARC
    *@ author Danielle
    package micromerger;
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.io.BufferedWriter;
    import java.io.File;
    import java.io.FileWriter;
    import java.io.IOException;
    import java.io.PrintWriter;
    import javax.swing.JFileChooser;
    import java.lang.Object;
    public class MGui
         private static File inputFile1, inputFile2;
         private static File sfile1, sfile2;
         private static String file1Name, file2Name;
         private String currFile1, currFile2;
         private JButton enterFile1, enterFile2;
         private JLabel enterLabel1, enterLabel2;
         private static MGui app;
         public MGui()
              javax.swing.SwingUtilities.invokeLater(new Runnable()
                   public void run()
                        System.out.println("About to run create GUI method");
                        app = new MGui();
                        System.out.println("declared a new MGui....");
                        createAndShowGUI();
         //initialize look and feel of program
         private static void initLookAndFeel() {
            String lookAndFeel = null;
         lookAndFeel = UIManager.getSystemLookAndFeelClassName();
         try
              UIManager.setLookAndFeel(lookAndFeel);
         catch (ClassNotFoundException e) {
                    System.err.println("Couldn't find class for specified look and feel:"
                                       + lookAndFeel);
                    System.err.println("Did you include the L&F library in the class path?");
                    System.err.println("Using the default look and feel.");
                } catch (UnsupportedLookAndFeelException e) {
                    System.err.println("Can't use the specified look and feel ("
                                       + lookAndFeel
                                       + ") on this platform.");
                    System.err.println("Using the default look and feel.");
                } catch (Exception e) {
                    System.err.println("Couldn't get specified look and feel ("
                                       + lookAndFeel
                                       + "), for some reason.");
                    System.err.println("Using the default look and feel.");
                    e.printStackTrace();
         // Make Components--
         private Component createLeftComponents()
              // Make panel-- grid layout
         JPanel pane = new JPanel(new GridLayout(0,1));
            //Add label
            JLabel welcomeLabel = new JLabel("Welcome to MicroMerger.  Please Enter your files.");
            pane.add(welcomeLabel);
         //Add buttons to enter files:
         enterFile1 = new JButton("Please click to enter the first file.");
         enterFile1.addActionListener(new enterFile1Action());
         pane.add(enterFile1);
         enterLabel1 = new JLabel("");
         pane.add(enterLabel1);
         enterFile2 = new JButton("Please click to enter the second file.");
         enterFile2.addActionListener(new enterFile2Action());
         pane.add(enterFile2);
         enterLabel2 = new JLabel("");
         pane.add(enterLabel2);
         return pane;
         /** Make GUI:
         private static void createAndShowGUI()
         System.out.println("Creating a gui...");
            JFrame.setDefaultLookAndFeelDecorated(true);
            //Create and set up the window.
            JFrame frame = new JFrame("MicroMerger");
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         //Add stuff to the frame
         //MGui app = new MGui();
         Component leftContents = app.createLeftComponents();
         frame.getContentPane().add(leftContents, BorderLayout.WEST);
            //Display the window.
            frame.pack();
            frame.setVisible(true);
    private class enterFile1Action implements ActionListener
         public void actionPerformed(ActionEvent evt)
              JFileChooser chooser = new JFileChooser();
              int rVal = chooser.showOpenDialog(enterFile1);
              if(rVal == JFileChooser.APPROVE_OPTION)
                   inputFile1 = chooser.getSelectedFile();
                   PrintWriter outputStream;
                   file1Name = inputFile1.getName();
                   enterLabel1.setText(file1Name);
    private class enterFile2Action implements ActionListener
         public void actionPerformed(ActionEvent evt)
              JFileChooser chooser = new JFileChooser();
              int rVal = chooser.showOpenDialog(enterFile1);
              if(rVal == JFileChooser.APPROVE_OPTION)
                   inputFile2 = chooser.getSelectedFile();
                   PrintWriter outputStream;
                   file2Name = inputFile2.getName();
                   enterLabel2.setText(file2Name);
    } // end classAnd now the main class:
    * Main.java
    * Created on June 13, 2006, 2:29 PM
    * @author Danielle
    package micromerger;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.io.*;
    public class Main
        /** Creates a new instance of Main */
        public Main()
         * @param args the command line arguments
        public static void main(String[] args)
            MGui mainScreen = new MGui();
            //mainScreen.setVisible(true);
            /**Starting to get file choices and moving them into GPR Handler:
             System.out.println("into main method");
         String file1Name = new String("");
             file1Name = MGui.get1Name();
         System.out.println("good so far- have MGui.get1Name()");
        }// end main(String[] args)
    }// end class Main

    um, yeah, you definitely have a recursion problem, that's going to create an infinite loop. you will eventually end up an out of memory error, if you don't first get the OS telling you you have too many windows. interestingly, because you are deferring execution, you won't get a stack overflow error, which you expect in an infinite recursion.
    lets examine why this is happening:
    in main, you call new MGui().
    new MGui() creates a runnable object which will be run on the event dispatch thread. That method ALSO calls new MGui(), which in turn ALSO creates a new object which will be run on the event dispatch thead. That obejct ALSO calls new MGui(), which ...
    well, hopefully you get the picture.
    you should never unconditionally call a method from within itself. that code that you have put in the constructor for MGui should REALLY be in the main method, and the first time you create the MGui in the main method as it currently exists is unnecessary.
    here's what you do: get rid of the MGui constructor altogether. since it is the implicit constructor anyway, if it doesn't do anything, you don't need to provide it.
    now, your main method should actually look like this:
    public static void main( String [] args ) {
      SwingUtilities.invokeLater( new Runnable() {
        public void run() {
          MGui app = new MGui();
          app.createAndShowGUI();
    }// end mainyou could also declare app and call the constructor before creating the Runnable, as many prefer, because you would have access to it from outside of the Runnable object. The catch there, though, is that app would need to be declared final.
    - Adam

  • Triggering event from for-each

    Hi,
    I have a process that takes long to execute, I want to be
    able to send a progress notification to the user with the hope of
    not getting him bored or impatient, for some reason I can't achieve
    it and I don't know where to go for help, if you know how to solve
    this, any help will be greatly appreciated.
    I have some code like this:
    <code in mxml for my application>
    - component declared .. onXEvent="showProgress()"
    - script for showProgress calls refresh for ProgressBar
    Component
    </code in mxml for my application>
    <code for my component>
    for each (var myObject:xObject in MyCollectionOfMyObjects)
    // do some complex logic and calls methods for this item
    // creates and triggers event for progress notification
    </code for my component>
    I would expect to see my ProgressBar advancing as the process
    is completed, but for some reason the process seems to take control
    of the execution and no onProgressEvent is fired until the foreach
    finishes execution. It will run perfectly in the debugger (step by
    step) but it doesn't work at runtime.
    Is there any way I can achieve this in Flex?? Is there any
    event class I can use to solve this issue?
    maybe anyone has done this before or knows a link to more
    information on this subject?
    Thanks in advance
    William Vega
    MCSD / Beginner Flex Developer

    Flash functions execute within a frame. They finish before
    any UI rendering is done. You will have to use callLater , somehow,
    within your loop to give the UI a chance to draw.. There is a more
    detailed answer to this thread somewhere else.
    Tracy

  • Paint() method is in infinite loop when focus is set to JTextPane

    Hi All,
    I am creating one JScrollPane, JPanel and JTextPane. JPanel is added to JScrollPane and JTextPane is added to JPanel. If I override paint() method in JPanel, its in infinite loop. I don't know why it is behaving like this. Can anyone solve my problem. Since, I am doing so much drawings in paint() method, its getting to slow.
    Here is the code what I wrote.
    import javax.swing.*;
    import javax.swing.border.*;
    import java.awt.*;
    import java.awt.event.*;
    public class TestTextPane1 extends JFrame {
         JPanel panel;
         JScrollPane pane;
         public TestTextPane1() {
              panel = new JPanel(new BorderLayout()) {
                   public void paint(Graphics g) {
                        super.paint(g);
                        System.out.println("inside paint");
              JTextPane textPane = new JTextPane();
              panel.add(textPane);
              pane = new JScrollPane(panel);
              getContentPane().add(pane);
              setSize(300, 200);
              setVisible(true);
         public static void main(String [] args) {
              new TestTextPane1();
    Any help will be useful for me.
    Regards
    Kishore.

    What are you trying to do? You are adding the textPane to the panel and then overriding the paint() method. The textPane will never be painted if you do this.
    In Swing, you should override the paintComponent() method, not the paint() method. See the Swing tutorial on Painting:
    http://java.sun.com/docs/books/tutorial/uiswing/overview/draw.html
    Don't forget to read the "Working With Graphics" link at the bottom.

Maybe you are looking for