Mdi concept in forms6

i want to use the mdi concept for my project
i.e opening all forms in a single window.how should i do it.

This link earlier in the discussion should help: http://technet.oracle.com:89/ubb/Forum4/HTML/004738.html

Similar Messages

  • Plese help me

    sir what is the use of dispose . iam doing aproject in java by using Swing(JFrame) and RMI while i am disposing a frame and call another forms instance through other form it shows Stack dump error how can i over come it is dispose can clear the stack values to control stack over flow.
    and i have to implement report in my project is it possible to create report in java.
    how can we implemnet MDI concept in java.
    thanks manoj

    for mdi try the jinternalframe and the jdesktoppane.
    http://java.sun.com/j2se/1.4/docs/api/javax/swing/JInternalFrame.html
    http://java.sun.com/j2se/1.4/docs/api/javax/swing/JDesktopPane.html
    tobias

  • Acrobat X: SDI vs. MDI

    I'd like to coninue this thread, because I believe it's important:
    Acrobat and Acrobat Reader are strongly missing the MDI feature.
    Probably the biggest share of "common" users will only open a single document at a time. But there are others around that sometimes have more than one single document open and who don't want to get their screen cluttered up with Acrobat documents.
    From the thread above there's a Hyperlink to the Acrobat blog, justifying why MDI has been removed from the Acrobat GUI.
    I believe the reasons given in there are wrong:
    Feature Parity with Macintosh was desired. As stated before, the Mac OS does not have this option. While I will be the first to admit that feature parity is not 100% between Windows and Macintosh, it is a goal that we aim for.
    As written at the top of the blog, "MDI is not applicable on the Mac OS." So this is simply a system feature not available to Mac OS but to Windows. Parity in regard to system environment can never be achieved. Otherwise, Acrobat would have to strip keyboard support, because smartphones like the IPhone lack the presence of a keyboard.
    Utilizing MDI is quite transparent to the software when being programmed properly. The client area to draw into won't be different. And the Mac OS will simply display like an MDI environment with just one document in it.
    In version 8, we made SDI the default in the viewing mode. Making SDI default, but still providing MDI in version 8 was done to start the deprecation of MDI.
    This is no reason at all. It's just a description of a decision you made.
    Microsoft advised that to work as good as possible on Vista, applications should avoid MDI.
    MDI is currently still available in any document centric Microsoft application. And it's available in any current document centric Adobe software - except for Acrobat.
    WPF is commonly used as the successor of MDI, yet multiple-document GUIs are fully supported in Windows.
    Acrobat and Adobe Reader’s new UI modes would not work with MDI. Form editing mode, portfolio mode, and portfolio preview mode all wanted a complete refresh of the UI. MDI mode always left a bit of the UI skin under the care of an MDI main frame, so there would have had been no way for those UI modes to re-skin that part of the UI if MDI mode was left in place.
    Perfoming these modes in MDI, WPF or any other multi-document environment would just have been a matter of good program design. Nothing more.
    And again, if Mac OS does not support MDI, it's still possible to abstract the display concept to address SDI/MDI differences transparently in the Acrobat application. Microsoft Office even demonstrates how this is done: In all the MS Office applications there is an option to switch between MDI/SDI ("Show in Task bar").
    A cost compelling reason was that MDI and SDI mode essentially became another view mode in which all work flows had to be tested. This increases the cost of testing the product and the cost of fixing bugs. Often a fix to a bug in one view mode would cause adverse reactions in the other view mode. The decision to support only one view mode on Windows was made to simplify this. Furthermore, more time spent in this area could mean less time spent developing and fixing bugs in other areas.
    That's true, alright. - But automated testing tools also decrease the cost of testing. And as far as I know, testers do not develop software. That's the developers' task. So performing more testing in this area does not result into spending less time for developing. This is particularly true once the framework had been established to deal with MDI/SDI transparently.
    I strongly suggest to return to MDI. The implementation classes should still be available from Acrobat 8. Perhaps they'd need a redo in order to support a better, transparent program design.

    Acrobat was never a part of Creative Suite, it was merely included in the collections. The CS applications were developed by a different unit within Adobe to the 'enterprise' applications like Acrobat and LiveCycle. The creative business unit developed their own interface system (OWL) but it wasn't adopted by the other teams as it was specifically designed for one type of user, who worked on multi-screen hardware with highly customized desktops and took the time to really learn the software in depth.
    The same is true of the consumer programs (Lightroom, etc.) - their target users have different hardware and skill levels, and their UIs reflects that. A Lightroom user doesn't need workspaces, and by discounting that the UI is free to implement something that makes more sense to photographers. In the OWL UI, you tend to have multiple information streams presented to the user in different panels, rather like an aircraft cockpit. The user is doing something with one tool, but can pull information from other panels as required. If they're editing text they need to see the swatches and styles panels. In Acrobat however, the workflow is single-task-based. You pick a tool, do something with it, then pick another tool. While you're editing a watermark there's no reason you would want to see the ink manager dialog or the XMP metadata.
    Of course I see the logic in having a tabbed interface, but for everyone it pleases there'll be someone who begrudges the space taken up by the tabs on their netbook screen, or the fact they can't drag one file onto a second monitor. Adobe would have to keep both interface options so you could switch between them, and that pretty much doubles the workload on every release.
    I'm not saying that going forward there's no chance of a tabbed interface ever appearing in the Acrobat Family, but with respect the target users tend to get lost when the UI reinvents itself. Acrobat is just a tool like the photocopier for most people, they aren't going to spend weeks learning it as they would with Photoshop. Open>Redact>Save>Email, all day every day. Adobe's target customers (big enterprises) see any change, even one that "improves" the UI, as a nightmare of retraining and reduced productivity.
    BendersonMath wrote:
    Actually, let me say something about homogeny of user experience. It seems like a fairly reasonable approach to this challenge is to come up with a UI that is intuitive based on knowledge users can be assumed to have from other UIs they can be assumed to be using. Acrobat's approach seems to be to come up with its own UI that is not only completely unlike the major OSes, but also unlike everything else Adobe does. Dividing Acrobat from Windows, Mac, etc. — sure, that's only fair. But why divorce it from the rest of its own sister products? The results have been strange.

  • ............ MDI in Forms 6i

    Hi all
    May i know how to create MDI in Forms 6i....
    I have read on basic documentation that MDI Forms Windows is probably not displayed on Object navigator etc.
    Kindly let me know the procedure on how to create the MDI Form Window
    Please tell me some links for Advanced Documentation concepts as well
    i shal be highly thankful to you ..
    I have posted a thread regarding the Size and display of Window..
    is is that Nobody has worked on that ...
    Thanx alot to all of you ..
    BR

    Hi,
    Source: Metalink
    Note:73444.1
    Subject: How to Control Windows Programatically in Forms?
    Bookmark Go to End
    Doc ID: Note:73444.1
    Subject: How to Control Windows Programatically in Forms?
    Type: BULLETIN
    Status: PUBLISHED
    Content Type: TEXT/X-HTML
    Creation Date: 29-JUL-1999
    Last Revision Date: 29-OCT-2002
    How to Control Windows Programmatically in Forms?
    =================================================
    This technical bulletin will cover the triggers and built-ins that you can
    use to manage the properties and behavior of windows and canvases at run time.
    We will learn how to:
    -- create trigger code to interact with windows
    -- control windows programmatically
    This technical bulletin will discuss the following items in more details:
    1) What are the window interaction triggers?
    2) What are the common uses for these triggers?
    3) How to keep track of the triggered window?
    4) What are the Built-ins for manipulating windows?
    5) What is the relationship between windows and blocks?
    6) How to manipulate windows properties programmatically?
    7) How to manipulate the MDI Application Window at form startup?
    8) How to locate the cursor window?
    9) How to show multiple windows?
    10) How to cascade windows with context?
    11) How to close windows?
    12) Known bugs with windows tiggers
    What are the Window Interaction Triggers?
    =========================================
    There are four window interaction triggers to provide extra functionality
    whenever a user interacts with a window. These triggers should be defined
    as the form level.
    Trigger                    Characteristic
    When-window-activated     Fires when a window is made the active window.
    Note that window activation can occur
    independently of navigation.
    When-window-deactivated     Fires when a user deactivates a window by
    setting the input focus to another window.
    When-window-closed     Fires when a user closes a window using a
    window-manager-specific Close command.
    When-window-resized     Fires when a window is resized, either by
    the user or through a trigger. It also fires
    at form startup, but not when a window is made
    into an icon.
    What are the Common Uses for These Triggers?
    ============================================
    Trigger                    Use
    When-window-activated     Enforces navigation to a window; captures
    initial window properties; keep track of most
    recently fired window triggers.
    When-window-deactivated     Deactivates a window.
    When-window-closed     Closes a window.
    When-window-resized     Maintains visual standards; captures window
    properties; audit actions of an operator; set
    input focus in an item in target window.
    Additional documentation and examples can be found in the Forms Online Help.
    How to Keep Track of the Triggered Window?
    ==========================================
    The :SYSTEM.EVENT_WINDOW system variable contains the name of the
    last window for which a window interaction trigger fired. You can use this
    system variable to perform different actions for different windows in your
    window interaction triggers.
    What are the Built-ins Used for Manipulating Windows?
    ================================================
    Built-in                    Description
    Find_window     Returns the internal window ID(of datatype
    WINDOW) of a window with the given name.
    Get_window_property      Returns the current value of the specified
    window property for the given window.
    Hide_window     Hides the window
    Move_window     Moves the window to the location specified by
    the given coordinates.
    Resize_window     Changes the window to the specified width and
    height.
    Set_window_property     Sets the specified window property for the given
    window to a specified value.
    Show_window     Makes the window visible at the current or
    specified display position.
    ID_Null Returns a BOOLEAN value that indicates whether the
    object ID is available.
    Additional documentation and examples can be found in the Forms Online Help.
    What is the Relationship Between Windows and Blocks?
    =====================================================
    Form builder processes many events based on blocks (and items), which can be
    completely independent of windows (and canvases). Keep in mind the following
    characteristics of windows and blocks:
    Connection between windows and blocks:
    -- A window can contain multiple canvases and multiple items can be located
    on a canvas.
    -- A block can contain multiple items and an item is located on one and only
    one canvas (except for null canvas items).
    -- A window can contain multiple blocks and the items in the block can be
    located on several windows.
    NOTE: In general, put blocks in separate windows. If blocks are closely
    related (through a foreign key relationship), put them in the same window.
    Window Activation and Block Navigation:
    You can use the when-window-activated trigger to activate another window
    automatically (we will see how we can do that later in this bulletin).
    Transaction Management:
    During commit processing, forms processes all base table blocks in sequential
    order. Therefore, transaction management is block based rather than
    window based. However, the user expects to interact with a form in a
    window based way.
    How to Manipulate Windows Properties Programmatically?
    ======================================================
    You can use the window-interaction triggers and the built-ins for windows
    to manipulate your windows (and the MDI application window on Microsoft
    windows) at runtime.
    How to manipulate the MDI Application Window at Form Startup?
    =============================================================
    The when-new-form-instance trigger below implements the following
    functionality:
    -- Maximizing the MDI application window.
    -- Setting the window title of the MDI application window.
    NOTE: The Forms MDI Window is only available for forms installed on MS Windows
    and for web forms starting with Developer 6.0.
    When-New-Form-Instance trigger at the Form Level
    BEGIN
    SET_WINDOW_PROPERTY(FORMS_MDI_WINDOW, WINDOW_STATE, MAXIMIZE);
    SET_WINDOW_PROPERTY(FORMS_MDI_WINDOW,TITLE, 'ANY_TITLE');
    END;
    You can also maximize the MDI window application with the WINDOW_STATE
    command line parameter:
    f45run32 module=emp userid=scott/tiger@DB window_state=maximize
    f50run32 module=emp userid=scott/tiger@DB window_state=maximize
    ifrun60 module=emp userid=scott/tiger@DB window_state=maximize
    NOTE: For web forms, place the as a parameter withing the serverArgs line in
    the forms html. This is the line where the form module is specified.
    How to locate the cursor window?
    ================================
    The cursor may be located in an inactive window. In this case, you can use
    the following GET_CURSOR_WINDOW function to find this window:
    FUNCTION GET_CURSOR_WINDOW RETURN VARCHAR2 IS
    BEGIN
    RETURN (GET_VIEW_PROPERTY(GET_ITEM_PROPERTY(NAME_IN('SYSTEM.CURSOR_ITEM'),
    ITEM_CANVAS),WINDOW1));
    END;
    How to Show Multiple Windows?
    ==============================
    When using several windows, you should consider how to position them with
    respect to each other and how to indicate the context in which a certain
    window is displayed.
    The following examples show a form based on dept for department table and
    emp for employee table. The department block and employee block are located
    in separate windows.
    When-New-Form-Instance Trigger at the Form Level:
    DECLARE
              v_first_windowx number;
              v_first_windowy number;
    BEGIN
              default_value('0', 'global.first_windowx');
              default_value('0', 'global.first_windowy');
              v_first_windowx := :global.first_windowx;
              v_first_windowy := :global.first_windowy;
              set_window_property('window1', position, v_first_windowx,
              v_first_windowy);
    --this is to locate window 2 in the right side of window1
              set_window_property('window2', position, v_first_windowx + 300,
         v_first_windowy );
              show_window('window1');
    END;
    How to cascade windows with context?
    =====================================
    Create when-new-block-instance trigger on e.g. emp block
    BEGIN
    SET_WINDOW_PROPERTY('WINDOW2', TITLE, 'EMPLOYEE INFORMATION');
    END;
    How to Close Windows?
    ======================
    Use the Close Menu Item on the system-menu box to provide the user with
    a means for closing windows. Because there is no default behavior in forms
    when a user chooses the Close Menu item, you must define a When-window-closed
    trigger.
    The following example shows a form based on dept and emp. The dept block
    and emp block are located in separate windows.
    When-Window-Closed Trigger at the Form Level:
         BEGIN
    IF :SYSTEM.EVENT_WINDOW= 'WINDOW1'
    THEN
              DO_KEY('exit_form');
         ELSIF :SYSTEM.EVENT_WINDOW='WINDOW2'
    THEN
         HIDE_WINDOW('WINDOW2');
    END IF;
    END;
    12) Known bugs with windows triggers
    ========================================
    bug # abstract
    944798 When-Window-Activated trigger does not fire returning from
    called form; Fixed in Forms 6i
    926729 When-Window-Activated trigger does not fire in Character mode
    (Synchronize!!!); Fixed in Forms 6i
    1089583 When-Window-Activated trigger not firing. Fixed in Forms 6i
    750724 Trigger When-Window-Activated fires only once; fixed in 4.5.7.2.0
    615132 Runtime: GPF raised by when-Window-Activated, When-Window-Closed,
    etc.; Workaround: Set the maximum length of CONTROL.MSG to <= 32767
    Fixed in Forms 6i
    Cheers,
    Monica

  • How can I disable Minimize, Restore & Close buttons of MDI window?

    I'm using Forms6i on Windows XP
    How can I disable Minimize, Restore & Close buttons of MDI window?
    An urgent reply would be apprecaited.
    MURUGESAN.T

    in windows property
    list of this
    close allowed
    move "
    resize "
    maximize "
    minimize "
    all to set "no"

  • Change MDI WINDOWS ICON

    Hello Gurus,
    We were trying to change the MDI window ICON in forms through the procedure given in d2kutil.pll We did successfully finished and its running fine.
    But when we run the same form through a command prompt by passing necessary useir id credentials and parameters for the form(s) its throwing a error frm-90734 internal pl/sql error occured.
    i.e we are running the form like below from the command prompt.
    ifrun60.exe userid=scott/tiger@db module=d:\forms\icontest.fmx.
    But If we include the path of the EXE in the command prompt It does work very well.
    i.e d:\forms6i\bin\ifrun60.exe userid=scott/tiger@db module=d:\forms\icontest.fmx.
    Respective Dll and Pll is available in the same folder and has been included in FORMS60_PATH as well.
    Why is it due to, any suggestions on this will be much appreciated.
    Thanks

    Hi
    We did tried copied it in the current folder from where the fmx is running.
    Its 6i Client Server only.
    Thanks

  • Flex mdi window and tab movement

    Hi All,
    In our flex mdi application, we have multiple windows. And if two or more windows have same field names, tab key travel to
    multiple windows rather than stay on the current window. How we can restrict tab to stay only on the current focused window.
    Any help in this regard is very appreciated.
    Regards,

    Thanks Alex, it does help us to understand the issue as you explained the concept of IFocusManagerContainer, Yes we are having same kind of problem as you explained. we are adding canvas windows to main canvas so all windows shared same focus manager. if we enable only active window and disable all other windows, the tab focus issue solved but it looks quite odd.
    And also tried to deactivate focus manager but did not work. So, can we remove a focus manager to a window and add it when it get focus.
    Many thanks.
    Regards,
    M. Hasan

  • Flex tab movement in mdi windows

    Hi All,
    In our flex mdi application, we have multiple windows. And if two or more windows have same field names, tab key travel to
    multiple windows rather than stay on the current window. How we can restrict tab to stay only on the current focused window.
    Any help in this regard is very appreciated.
    Regards,

    Thanks Alex, it does help us to understand the issue as you explained the concept of IFocusManagerContainer, Yes we are having same kind of problem as you explained. we are adding canvas windows to main canvas so all windows shared same focus manager. if we enable only active window and disable all other windows, the tab focus issue solved but it looks quite odd.
    And also tried to deactivate focus manager but did not work. So, can we remove a focus manager to a window and add it when it get focus.
    Many thanks.
    Regards,
    M. Hasan

  • Free goods concept in STO

    hi all,
    i have an issue regarding free goods for STO betn plants.
    our concept is to give free goods for ex- 10 out of 100 are free goods.
    when i am creating a po with item catagory U, the free goods indicator is become vanice. so i am unable to process this free goods.
    so if any settings is thr , then pls let me know.
    regards,
    susanta

    hi
    ru selling ur goods to ur plant?
    in sto ur not selling the material to ur plant
    so the issue of free goods is not there
    thats why u cant see any kind of basic cost condition in that
    as the material is transfer from one plant to another the inventory changes and so the the price in material master is get updated for the another plznt
    refer following docs
    with delivery
    http://help.sap.com/bp_blv1600/V5600/BBLibrary/HTML/134_EN_IN.htm
    without  delivery
    http://help.sap.com/bp_blv1600/V5600/BBLibrary/HTML/135_EN_IN.htm
    hope it clears
    regards
    kunal
    award if helpful

  • Concept of free –m command in Linux

    I wanted to know the concept of free –m command as there are different rows of Mem, -/+ buffers/cache & Swap in the output. As an example, it is showing 195 as free Mem in my server but 13850 in the free section of the -/+ buffers/cache. The output needs in depth knowledge of the different parameters of the command.
    I hope, my question is clear.
    Please revert with the reply to my query.
    Regards

    This is my understanding. used and free column in line 2 can be used to find out total used and free memory for applications
    [oracle@test ~]$ free
    total used free shared buffers cached
    Mem: 264122724 253692112 10430612 0 2074864 178696468
    -/+ buffers/cache: 72920780 191201944
    Swap: 8388600 0 8388600
    select 264122724/1024/1024 "Total RAM" FROM DUAL; (264122724 ---from line 1 Mem)
    Total RAM
    251.887058
    select (253692112-(2074864+178696468)) "used for applications" from dual; (used from line 1 - (buffers + cached) from line 1)
    used for applications
    --------------------- (matches with used from line 2)
    72920780
    select 10430612+2074864+178696468 "total free for applications" from dual;
    total free for applications
    191201944 (matches with free from line 2)
    Edited by: vlethakula on Jan 17, 2013 7:18 AM

  • HR-ABAP-Infotypes concept

    Hi Masters,
                           Can you please let me know the perfect reason for infotypes concept in HR-ABAP.
    1 Why we are using infotypes and exactly what is purpose?
    2.Why we are using LDB's why cannot we extract data directly from database tables?
    3.Can you please give me clear explanations about these infotypes.

    Hi
    Infotype(s) are used in the Personnel Management (PA) module primarily. This is where personnel master data is stored. Data is grouped according to subject matter. The Human Resources component aims to enable the user to process employee data in an effective structure in accordance with business requirements. The data structure of infotypes mirrors a logical set of data records. Infotypes can be identified by their four-digit keys, for example, the Addresses infotype (0006). To facilitate reporting on past employee data, infotypes can be saved for specific periods.
    Some people use the term HR ABAP to describe the method of managing the infotype data. Typically HR logical databases are used which offers more secure methods of accessing the infotype data. Once the infotypes are declared, you can use standard macros to access the data. Table TRMAC holds the macro name and the code behind it. This makes developing HR programs much quicker and easy to turn around.
    HR uses INFOTYPES instead of tables.
    There are different sub modules exist in HR.
    For Personal Admn the Infotypes start with PA0000 to PA1999
    Time Related Infotypes start with PA2000 to PA2999.
    Orgn related Infotypes start with HRP1000 to HRP1999.
    All custom developed infotypes stsrat with PA9000 onwards.
    In payroll processing we use Clusters like PCL1,2,3 and 4.
    Instead of Select query we use PROVIDE and ENDPROVIDE..
    You have to assign a Logical Database in the attributes PNP.
    Go through the SAp doc for HR programming and start doing.
    http://www.sapdevelopment.co.uk/hr/hrhome.htm
    See:
    http://help.sap.com/saphelp_46c/helpdata/en/4f/d5268a575e11d189270000e8322f96/content.htm
    http://help.sap.com/saphelp_47x200/helpdata/en/bb/bdb041575911d189240000e8323d3a/frameset.htm
    see this link you would get information about types of infotypes
    Logical databases are special ABAP programs that retrieve data and make it available toapplication programs. The most common use of logical databases is still to read data fromdatabase tables by linkin them to executable ABAP programs.
    Logical databases contain Open SQL statements that read data from the database.You do not therefore need to use SQL in your own programs. The logical database reads theprogram, stores them in the program if necessary, and then passes them line by line to theapplication program or the function module LDB_PROCESS using an interface work area .
    For further info
    check link http://help.sap.com/saphelp_nw70/helpdata/en/9f/db9b5e35c111d1829f0000e829fbfe/frameset.htm
    1. A logical database is in fact
    a program only.
    2. This LDB provides two main things :
    a) a pre-defined selection screen
    which handles all user inputs and validations
    b) pre defined set of data
    based upon the user selection.
    3. So we dont have to worry about from
    which tables to fetch data.
    4. Moreover, this LDB Program,
    handles all user-authorisations
    and is efficient in all respects.
    5. tcode is SLDB.
    /people/srivijaya.gutala/blog/2007/03/05/why-not-logical-databases
    <b>REward fi suefull</b>

  • Java package concept in ABAP Objects

    Hi, just a question on grouping of classes in ABAP Objects.
    In Java, you can group classes by "package" to avoid
    namespace collision, my question, in ABAP Objects, how
    do you group classes to avoid namespace collision?
    I know that there is package concept in SAP/ABAP but it
    is different concept in Java.
    Thanks in advanced for your reply.

    Hello One and Lonley,
    the package concept in ABAP and Java is quite different. In java the package name is part of the development object in ABAP not. So any class pool name is global unique. In combination with the restriction on 30 chars this leads often to somehow cryptic names.
    The only way to escape this somehow is the excessive use of local classes. That mean classes defined within main programs. If you are on 7.00 you may check FuGr SAPLSAUNIT_TREE_CTRL_LISTENER for this technique.
    Best Regards
      klaus

  • Can not connect from Forms6i to PO8i.

    Hi,
    My PC is a NT named 'oracle'. I have first installed Forms6i in DEFAULT_HOME, c:/orant.
    PO8i is installed as:
    Oracle Home: ora8i
    Full Path: c:\orant\ora8i
    Choose Typical Install
    Global Database Name: ora8i.oracle.master.com.au
    SID: ora8i
    Then I added an entry in c:\orant\net80\admin\tnsnames.ora as:
    test.world
    (DESCRIPTION
    (ADDRESS_LIST
    (ADDRESS
    (PROTOCOL = TCP)
    (Host = 127.0.0.1)
    (Port = 1521)
    (CONNECT_DATA = (SID = ora8i)
    I can connect to PO8i from SQL*Plus using scott/tiger or scott/tiger@ora8i.
    When I tried to connect to PO8i from Forms6i using scott/tiger@test or scott/tiger@ora8i. I got ORA-12154: TNS:could not resolve service name.
    If I use scott/tiger@test from SQL*Plus, I got the same error.
    If I use scott/tiger from Forms6i, I got ORA-12203: TNS:unable to connect to destination.
    Help please.
    Sue
    null

    Try taking off the .world in the NET80 tnsnames.ora file
    Jason Pepper
    Snr Product Manager
    Oracle Enterprise Internet Tools

  • Help needed Displaying ALV  Secondary list without using oops concept

    Hi Experts
    Help needed Displaying ALV  Secondary list without using oops concept.
    its urgent
    regds
    rajasekhar

    hi chk this code
    ******************TABLES DECLARATION*****************
    TABLES : VBAP,MARA.
    *****************TYPE POOLS**************************
    TYPE-POOLS : SLIS.
    ****************INTERNAL TABLES**********************
    DATA : BEGIN OF IT_VBAP OCCURS 0,
    VBELN LIKE VBAP-VBELN, "SALES DOCUMENT
    POSNR LIKE VBAP-POSNR, "SALES DOCUMENT ITEM
    MATNR LIKE VBAP-MATNR, "MATERIAL NUMBER
    END OF IT_VBAP.
    ****************TEMPORARY VARIABLES******************
    DATA : V_VBELN LIKE VBAP-VBELN."SALES DOCUMENT
    DATA : V_MTART LIKE MARA-MTART. "MATERIAL TYPE
    *****************FIELD CATALOG***********************
    DATA : IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
           WA_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
    ****************LAYOUT*******************************
    DATA : WA_LAYOUT TYPE SLIS_LAYOUT_ALV.
    ***************VARIANT*******************************
    DATA : G_VARIANT LIKE DISVARIANT.
    ****************SAVE*********************************
    DATA : G_SAVE(1) TYPE C.
    *****************EVENTS******************************
    DATA : XS_EVENTS TYPE SLIS_ALV_EVENT,
           G_EVENTS TYPE SLIS_T_EVENT.
    ******************PF STATUS**************************
    DATA : PF_STATUS TYPE SLIS_FORMNAME VALUE 'SET_PF_STATUS'.
    ******************USER COMMAND************************
    DATA : USER_COMMAND TYPE SLIS_FORMNAME VALUE 'SET_USER_COMMAND',
           R_UCOMM LIKE SY-UCOMM.
    ****************SELECTION SCREEN************************
    SELECT-OPTIONS : S_VBELN FOR VBAP-VBELN.
    ***************AT SELECTION SCREEN*********************
    AT SELECTION-SCREEN.
      PERFORM VALIDATE.
    **************START-OF-SELECTION**************************
    START-OF-SELECTION.
      PERFORM GET_DETAILS.
      PERFORM FIELDCAT.
      PERFORM LAYOUT.
      PERFORM VARIANT.
      PERFORM SAVE.
      PERFORM EVENTS.
      PERFORM ALV_DISPLAY.
    *********************FORMS*******************************************
    *&      Form  validate
          text
    -->  p1        text
    <--  p2        text
    FORM VALIDATE .
      SELECT SINGLE VBELN
                    FROM VBAP
                    INTO V_VBELN
                    WHERE VBELN IN S_VBELN.
      IF SY-SUBRC <> 0.
        MESSAGE E000 WITH 'enter valid vbeln'.
      ENDIF.
    ENDFORM.                    " validate
    *&      Form  get_details
          text
    -->  p1        text
    <--  p2        text
    FORM GET_DETAILS .
      SELECT VBELN
             POSNR
             MATNR
             FROM VBAP
             INTO TABLE IT_VBAP
             WHERE VBELN IN S_VBELN.
      IF SY-SUBRC <> 0.
        MESSAGE E000 WITH 'no details found'.
      ENDIF.
    ENDFORM.                    " get_details
    *&      Form  fieldcat
          text
    -->  p1        text
    <--  p2        text
    FORM FIELDCAT .
      WA_FIELDCAT-TABNAME = 'IT_VBAP'.
      WA_FIELDCAT-FIELDNAME = 'VBELN'.
      WA_FIELDCAT-OUTPUTLEN = 10.
      WA_FIELDCAT-SELTEXT_L = 'SALES DOC'.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      CLEAR WA_FIELDCAT.
      WA_FIELDCAT-TABNAME = 'IT_VBAP'.
      WA_FIELDCAT-FIELDNAME = 'POSNR'.
      WA_FIELDCAT-OUTPUTLEN = 6.
      WA_FIELDCAT-SELTEXT_L = 'ITEM'.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      CLEAR WA_FIELDCAT.
      WA_FIELDCAT-TABNAME = 'IT_VBAP'.
      WA_FIELDCAT-FIELDNAME = 'MATNR'.
      WA_FIELDCAT-OUTPUTLEN = 18.
      WA_FIELDCAT-SELTEXT_L = 'MATERIAL NO'.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      CLEAR WA_FIELDCAT.
    ENDFORM.                    " fieldcat
    *&      Form  LAYOUT
          text
    -->  p1        text
    <--  p2        text
    FORM LAYOUT .
      WA_LAYOUT-ZEBRA = 'X'.
    ENDFORM.                    " LAYOUT
    *&      Form  VARIANT
          text
    -->  p1        text
    <--  p2        text
    FORM VARIANT .
      CLEAR G_VARIANT.
      G_VARIANT-REPORT = SY-REPID.
    ENDFORM.                    " VARIANT
    *&      Form  SAVE
          text
    -->  p1        text
    <--  p2        text
    FORM SAVE .
      CLEAR G_SAVE.
      G_SAVE = 'A'.
    ENDFORM.                    " SAVE
    *&      Form  EVENTS
          text
    -->  p1        text
    <--  p2        text
    FORM EVENTS .
      CLEAR XS_EVENTS.
      XS_EVENTS-NAME = SLIS_EV_TOP_OF_PAGE.
      XS_EVENTS-FORM = 'TOP_OF_PAGE'.
      APPEND XS_EVENTS TO G_EVENTS.
    ENDFORM.                    " EVENTS
    *&      Form  TOP_OF_PAGE
          text
    FORM TOP_OF_PAGE.
      WRITE :/ ' INTELLI GROUP'.
    ENDFORM.                    "TOP_OF_PAGE
    *&      Form  ALV_DISPLAY
          text
    -->  p1        text
    <--  p2        text
    FORM ALV_DISPLAY .
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
       EXPORTING
      I_INTERFACE_CHECK              = ' '
      I_BYPASSING_BUFFER             =
      I_BUFFER_ACTIVE                = ' '
         I_CALLBACK_PROGRAM             = SY-REPID
         I_CALLBACK_PF_STATUS_SET       = PF_STATUS
         I_CALLBACK_USER_COMMAND        = USER_COMMAND
      I_STRUCTURE_NAME               =
         IS_LAYOUT                      = WA_LAYOUT
         IT_FIELDCAT                    = IT_FIELDCAT
      IT_EXCLUDING                   =
      IT_SPECIAL_GROUPS              =
      IT_SORT                        =
      IT_FILTER                      =
      IS_SEL_HIDE                    =
      I_DEFAULT                      = 'X'
         I_SAVE                         = G_SAVE
         IS_VARIANT                     = G_VARIANT
         IT_EVENTS                      = G_EVENTS
      IT_EVENT_EXIT                  =
      IS_PRINT                       =
      IS_REPREP_ID                   =
      I_SCREEN_START_COLUMN          = 0
      I_SCREEN_START_LINE            = 0
      I_SCREEN_END_COLUMN            = 0
      I_SCREEN_END_LINE              = 0
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER        =
      ES_EXIT_CAUSED_BY_USER         =
        TABLES
          T_OUTTAB                       = IT_VBAP
       EXCEPTIONS
         PROGRAM_ERROR                  = 1
         OTHERS                         = 2
      IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " ALV_DISPLAY
    *&      Form  SET_PF_STATUS
          text
    FORM SET_PF_STATUS USING EXTAB TYPE SLIS_T_EXTAB.
      SET PF-STATUS 'Z50651_PFSTATUS' EXCLUDING EXTAB.
    ENDFORM.                    "SET_PF_STATUS
    *&      Form  SET_USER_COMMAND
          text
    FORM SET_USER_COMMAND USING R_UCOMM
                                RS_SELFIELD TYPE SLIS_SELFIELD.
      CASE R_UCOMM.
        WHEN 'DC'.
          READ TABLE IT_VBAP INDEX RS_SELFIELD-TABINDEX.
          IF SY-SUBRC = 0.
            SELECT SINGLE MTART
                          FROM MARA
                          INTO V_MTART
                          WHERE MATNR = IT_VBAP-MATNR.
            IF SY-SUBRC <> 0.
       MESSAGE E000 WITH 'NO MATERIAL DESCRIPTION FOR SELECTED MATERIAL NO'.
            ELSE.
              WRITE :/ 'MATERIAL NO :',IT_VBAP-MATNR.
              WRITE :/ 'MATERIAL TYPE :' , V_MTART.
            ENDIF.
          ENDIF.
        WHEN 'BACK'.
          LEAVE TO SCREEN 0.
        WHEN 'EXIT'.
          LEAVE TO SCREEN 0.
        WHEN 'CLOSE'.
          CALL TRANSACTION 'SE38'.
      ENDCASE.
    REPORT  Z_ALV_INTERACTIVE  MESSAGE-ID ZMSG_50651
                                    LINE-SIZE 100
                                    LINE-COUNT 60
                                    NO STANDARD PAGE HEADING.
    ******************TABLES DECLARATION*****************
    TABLES : VBAP,MARA.
    *****************TYPE POOLS**************************
    TYPE-POOLS : SLIS.
    ****************INTERNAL TABLES**********************
    DATA : BEGIN OF IT_VBAP OCCURS 0,
    VBELN LIKE VBAP-VBELN, "SALES DOCUMENT
    POSNR LIKE VBAP-POSNR, "SALES DOCUMENT ITEM
    MATNR LIKE VBAP-MATNR, "MATERIAL NUMBER
    END OF IT_VBAP.
    ****************TEMPORARY VARIABLES******************
    DATA : V_VBELN LIKE VBAP-VBELN."SALES DOCUMENT
    DATA : V_MTART LIKE MARA-MTART. "MATERIAL TYPE
    *****************FIELD CATALOG***********************
    DATA : IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
           WA_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
    ****************LAYOUT*******************************
    DATA : WA_LAYOUT TYPE SLIS_LAYOUT_ALV.
    ***************VARIANT*******************************
    DATA : G_VARIANT LIKE DISVARIANT.
    ****************SAVE*********************************
    DATA : G_SAVE(1) TYPE C.
    *****************EVENTS******************************
    DATA : XS_EVENTS TYPE SLIS_ALV_EVENT,
           G_EVENTS TYPE SLIS_T_EVENT.
    ******************PF STATUS**************************
    DATA : PF_STATUS TYPE SLIS_FORMNAME VALUE 'SET_PF_STATUS'.
    ******************USER COMMAND************************
    DATA : USER_COMMAND TYPE SLIS_FORMNAME VALUE 'SET_USER_COMMAND',
           R_UCOMM LIKE SY-UCOMM.
    ****************SELECTION SCREEN************************
    SELECT-OPTIONS : S_VBELN FOR VBAP-VBELN.
    ***************AT SELECTION SCREEN*********************
    AT SELECTION-SCREEN.
      PERFORM VALIDATE.
    **************START-OF-SELECTION**************************
    START-OF-SELECTION.
      PERFORM GET_DETAILS.
      PERFORM FIELDCAT.
      PERFORM LAYOUT.
      PERFORM VARIANT.
      PERFORM SAVE.
      PERFORM EVENTS.
      PERFORM ALV_DISPLAY.
    *********************FORMS*******************************************
    *&      Form  validate
          text
    -->  p1        text
    <--  p2        text
    FORM VALIDATE .
      SELECT SINGLE VBELN
                    FROM VBAP
                    INTO V_VBELN
                    WHERE VBELN IN S_VBELN.
      IF SY-SUBRC <> 0.
        MESSAGE E000 WITH 'enter valid vbeln'.
      ENDIF.
    ENDFORM.                    " validate
    *&      Form  get_details
          text
    -->  p1        text
    <--  p2        text
    FORM GET_DETAILS .
      SELECT VBELN
             POSNR
             MATNR
             FROM VBAP
             INTO TABLE IT_VBAP
             WHERE VBELN IN S_VBELN.
      IF SY-SUBRC <> 0.
        MESSAGE E000 WITH 'no details found'.
      ENDIF.
    ENDFORM.                    " get_details
    *&      Form  fieldcat
          text
    -->  p1        text
    <--  p2        text
    FORM FIELDCAT .
      WA_FIELDCAT-TABNAME = 'IT_VBAP'.
      WA_FIELDCAT-FIELDNAME = 'VBELN'.
      WA_FIELDCAT-OUTPUTLEN = 10.
      WA_FIELDCAT-SELTEXT_L = 'SALES DOC'.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      CLEAR WA_FIELDCAT.
      WA_FIELDCAT-TABNAME = 'IT_VBAP'.
      WA_FIELDCAT-FIELDNAME = 'POSNR'.
      WA_FIELDCAT-OUTPUTLEN = 6.
      WA_FIELDCAT-SELTEXT_L = 'ITEM'.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      CLEAR WA_FIELDCAT.
      WA_FIELDCAT-TABNAME = 'IT_VBAP'.
      WA_FIELDCAT-FIELDNAME = 'MATNR'.
      WA_FIELDCAT-OUTPUTLEN = 18.
      WA_FIELDCAT-SELTEXT_L = 'MATERIAL NO'.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      CLEAR WA_FIELDCAT.
    ENDFORM.                    " fieldcat
    *&      Form  LAYOUT
          text
    -->  p1        text
    <--  p2        text
    FORM LAYOUT .
      WA_LAYOUT-ZEBRA = 'X'.
    ENDFORM.                    " LAYOUT
    *&      Form  VARIANT
          text
    -->  p1        text
    <--  p2        text
    FORM VARIANT .
      CLEAR G_VARIANT.
      G_VARIANT-REPORT = SY-REPID.
    ENDFORM.                    " VARIANT
    *&      Form  SAVE
          text
    -->  p1        text
    <--  p2        text
    FORM SAVE .
      CLEAR G_SAVE.
      G_SAVE = 'A'.
    ENDFORM.                    " SAVE
    *&      Form  EVENTS
          text
    -->  p1        text
    <--  p2        text
    FORM EVENTS .
      CLEAR XS_EVENTS.
      XS_EVENTS-NAME = SLIS_EV_TOP_OF_PAGE.
      XS_EVENTS-FORM = 'TOP_OF_PAGE'.
      APPEND XS_EVENTS TO G_EVENTS.
    ENDFORM.                    " EVENTS
    *&      Form  TOP_OF_PAGE
          text
    FORM TOP_OF_PAGE.
      WRITE :/ ' INTELLI GROUP'.
    ENDFORM.                    "TOP_OF_PAGE
    *&      Form  ALV_DISPLAY
          text
    -->  p1        text
    <--  p2        text
    FORM ALV_DISPLAY .
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
       EXPORTING
      I_INTERFACE_CHECK              = ' '
      I_BYPASSING_BUFFER             =
      I_BUFFER_ACTIVE                = ' '
         I_CALLBACK_PROGRAM             = SY-REPID
       I_CALLBACK_PF_STATUS_SET         = PF_STATUS
         I_CALLBACK_USER_COMMAND        = USER_COMMAND
      I_STRUCTURE_NAME               =
         IS_LAYOUT                      = WA_LAYOUT
         IT_FIELDCAT                    = IT_FIELDCAT
      IT_EXCLUDING                   =
      IT_SPECIAL_GROUPS              =
      IT_SORT                        =
      IT_FILTER                      =
      IS_SEL_HIDE                    =
      I_DEFAULT                      = 'X'
         I_SAVE                         = G_SAVE
        IS_VARIANT                      = G_VARIANT
         IT_EVENTS                      = G_EVENTS
      IT_EVENT_EXIT                  =
      IS_PRINT                       =
      IS_REPREP_ID                   =
      I_SCREEN_START_COLUMN          = 0
      I_SCREEN_START_LINE            = 0
      I_SCREEN_END_COLUMN            = 0
      I_SCREEN_END_LINE              = 0
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER        =
      ES_EXIT_CAUSED_BY_USER         =
        TABLES
          T_OUTTAB                       = IT_VBAP
       EXCEPTIONS
         PROGRAM_ERROR                  = 1
         OTHERS                         = 2
      IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " ALV_DISPLAY
    *&      Form  SET_PF_STATUS
          text
    FORM SET_PF_STATUS USING EXTAB TYPE SLIS_T_EXTAB.
      SET PF-STATUS 'STANDARD' EXCLUDING EXTAB.
    ENDFORM.                    "SET_PF_STATUS
    *&      Form  SET_USER_COMMAND
          text
    FORM SET_USER_COMMAND USING R_UCOMM
                                RS_SELFIELD TYPE SLIS_SELFIELD.
      CASE R_UCOMM.
        WHEN 'DC'.
          READ TABLE IT_VBAP INDEX RS_SELFIELD-TABINDEX.
          IF SY-SUBRC = 0.
            SELECT SINGLE MTART
                          FROM MARA
                          INTO V_MTART
                          WHERE MATNR = IT_VBAP-MATNR.
            IF SY-SUBRC <> 0.
       MESSAGE E000 WITH 'NO MATERIAL DESCRIPTION FOR SELECTED MATERIAL NO'.
            ELSE.
              WRITE :/ 'MATERIAL NO :',IT_VBAP-MATNR.
              WRITE :/ 'MATERIAL TYPE :' , V_MTART.
      SUBMIT SLIS_DUMMY WITH P_MATNR EQ IT_VBAP-MATNR
                        WITH P_MTART EQ V_MTART.
            ENDIF.
          ENDIF.
        WHEN 'BACK'.
          LEAVE TO SCREEN 0.
        WHEN 'EXIT'.
          LEAVE TO SCREEN 0.
        WHEN 'CLOSE'.
          CALL TRANSACTION 'SE38'.
      ENDCASE.
    plz reward if useful

  • MDI JTable Overlap Area Repaint Problem

    Hi all,
    I have a problem for my application in MDI mode.
    I open many windows (JInternalFrame contain JTable) under JDesktopPane. Some of the windows are overlapping and when they receive update in the table, it seems repaint all of the overlapping windows, not only itself. This make my application performance become poor, slow respond for drap & drop an existing window or open a new window.
    To prove this, i make a simple example for open many simple table and have a thread to update the table's value for every 200 mill second. After i open about 20 windows, the performance become poor again.
    If anyone face the same problem with me and any suggestions to solve the problem ?
    Please help !!!!!
    Following are my sources:
    public class TestMDI extends JFrame {
        private static final long serialVersionUID = 1L;
        private JPanel contentPanel;
        private JDesktopPane desktopPane;
        private JMenuBar menuBar;
        private List<TestPanel> allScreens = new ArrayList<TestPanel>();
        private List<JDialog> freeFloatDialogs = new ArrayList<JDialog>();
        private List<JInternalFrame> mdiInternalFrm = new ArrayList<JInternalFrame>();
        int x = 0;
        int y = 0;
        int index = 0;
        private static int MDI_MODE = 0;
        private static int FREE_FLOAT_MODE = 1;
        private int windowMode = MDI_MODE;
        public TestMDI() {
            init();
        public static void main(String[] args) {
            new TestMDI().show();
        public void init() {
            contentPanel = new JPanel();
            desktopPane = new JDesktopPane();
            desktopPane.setDragMode(JDesktopPane.LIVE_DRAG_MODE);
            desktopPane.setFocusTraversalKeysEnabled(false);
            desktopPane.setFocusTraversalPolicyProvider(false);
            desktopPane.setBorder(null);
            desktopPane.setIgnoreRepaint(true);
            desktopPane.setPreferredSize(new Dimension(1000, 800));
            this.setSize(new Dimension(1000, 800));
            menuBar = new JMenuBar();
            JMenu menu1 = new JMenu("Test");
            JMenuItem menuItem1 = new JMenuItem("Open Lable Screen");
            menuItem1.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    for (int i = 1; i < 4; i++) {
                        final TestJLableScreen screen = new TestJLableScreen("Screen  " + (allScreens.size() + 1));
                        screen.startTime();
                        if (windowMode == MDI_MODE) {
                            JInternalFrame frame = createInternalFram(screen);
                            desktopPane.add(frame);
                            mdiInternalFrm.add(frame);
                            if (allScreens.size() * 60 + 100 < 1000) {
                                x = allScreens.size() * 60;
                                y = 60;
                            } else {
                                x = 60 * index;
                                y = 120;
                                index++;
                            frame.setLocation(x, y);
                            frame.setVisible(true);
                        } else {
                            JDialog dialog = createJDialog(screen);
                            freeFloatDialogs.add(dialog);
                            if (i * 60 + 100 < 1000) {
                                x = i * 60;
                                y = 60;
                            } else {
                                x = 60 * index;
                                y = 120;
                                index++;
                            dialog.setLocation(x, y);
                            dialog.setVisible(true);
                        allScreens.add(screen);
            JMenuItem menuItem2 = new JMenuItem("Open Table Screen");
            menuItem2.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    for (int i = 1; i < 4; i++) {
                        TestTableScreen screen = new TestTableScreen("Screen  " + (allScreens.size() + 1));
                        screen.startTime();
                        if (windowMode == MDI_MODE) {
                            JInternalFrame frame = createInternalFram(screen);
                            desktopPane.add(frame);
                            mdiInternalFrm.add(frame);
                            if (allScreens.size() * 60 + 100 < 1000) {
                                x = allScreens.size() * 60;
                                y = 60;
                            } else {
                                x = 60 * index;
                                y = 120;
                                index++;
                            frame.setLocation(x, y);
                            frame.setVisible(true);
                        } else {
                            JDialog dialog = createJDialog(screen);
                            freeFloatDialogs.add(dialog);
                            if (i * 60 + 100 < 1000) {
                                x = i * 60;
                                y = 60;
                            } else {
                                x = 60 * index;
                                y = 120;
                                index++;
                            dialog.setLocation(x, y);
                            dialog.setVisible(true);
                        allScreens.add(screen);
            menu1.add(menuItem1);
            menu1.add(menuItem2);
            this.setJMenuBar(menuBar);
            this.getJMenuBar().add(menu1);
            this.getJMenuBar().add(createSwitchMenu());
            this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            this.add(desktopPane);
            desktopPane.setDesktopManager(null);
        public JInternalFrame createInternalFram(final TestPanel panel) {
            final CustomeInternalFrame internalFrame = new CustomeInternalFrame(panel.getTitle(), true, true, true, true) {
                public void doDefaultCloseAction() {
                    super.doDefaultCloseAction();
                    allScreens.remove(panel);
            internalFrame.setPanel(panel);
            // internalFrame.setOpaque(false);
            internalFrame.setSize(new Dimension(1010, 445));
            internalFrame.add(panel);
            internalFrame.setFocusTraversalKeysEnabled(false);
            internalFrame.setFocusTraversalPolicyProvider(false);
            desktopPane.getDesktopManager();
            // internalFrame.setFocusTraversalKeysEnabled(false);
            internalFrame.setIgnoreRepaint(true);
            return internalFrame;
        public JDialog createJDialog(final TestPanel panel) {
            JDialog dialog = new JDialog(this, panel.getTitle());
            dialog.setSize(new Dimension(1010, 445));
            dialog.add(panel);
            dialog.addWindowListener(new WindowAdapter() {
                public void windowClosing(WindowEvent e) {
                    allScreens.remove(panel);
            return dialog;
        public JMenu createSwitchMenu() {
            JMenu menu = new JMenu("Test2");
            JMenuItem menuItem1 = new JMenuItem("Switch FreeFloat");
            menuItem1.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    windowMode = FREE_FLOAT_MODE;
                    for (JInternalFrame frm : mdiInternalFrm) {
                        frm.setVisible(false);
                        frm.dispose();
                        frm = null;
                    mdiInternalFrm.clear();
                    remove(desktopPane);
                    desktopPane.removeAll();
    //                revalidate();
                    repaint();
                    add(contentPanel);
                    index = 0;
                    for (JDialog dialog : freeFloatDialogs) {
                        dialog.setVisible(false);
                        dialog.dispose();
                        dialog = null;
                    freeFloatDialogs.clear();
                    for (int i = 0; i < allScreens.size(); i++) {
                        JDialog dialog = createJDialog(allScreens.get(i));
                        freeFloatDialogs.add(dialog);
                        if (i * 60 + 100 < 1000) {
                            x = i * 60;
                            y = 60;
                        } else {
                            x = 60 * index;
                            y = 120;
                            index++;
                        dialog.setLocation(x, y);
                        dialog.setVisible(true);
            JMenuItem menuItem2 = new JMenuItem("Switch MDI");
            menuItem2.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    windowMode = MDI_MODE;
                    remove(contentPanel);
                    add(desktopPane);
                    for (int i = 0; i < freeFloatDialogs.size(); i++) {
                        freeFloatDialogs.get(i).setVisible(false);
                        freeFloatDialogs.get(i).dispose();
                    freeFloatDialogs.clear();
    //                revalidate();
                    repaint();
                    for (JInternalFrame frm : mdiInternalFrm) {
                        frm.setVisible(false);
                        frm.dispose();
                        frm = null;
                    mdiInternalFrm.clear();
                    index = 0;
                    for (int i = 0; i < allScreens.size(); i++) {
                        JInternalFrame frame = createInternalFram(allScreens.get(i));
                        desktopPane.add(frame);
                        mdiInternalFrm.add(frame);
                        if (i * 60 + 100 < 1000) {
                            x = i * 60;
                            y = 60;
                        } else {
                            x = 60 * index;
                            y = 120;
                            index++;
                        frame.setLocation(x, y);
                        frame.setVisible(true);
            menu.add(menuItem1);
            menu.add(menuItem2);
            return menu;
    public class TestTableScreen extends TestPanel {
        private static final long serialVersionUID = 1L;
        JTable testTable = new JTable();
        MyTableModel tableModel1 = new MyTableModel(1);
        private boolean notRepaint = false;
        int start = 0;
        JScrollPane scrollPane = new JScrollPane();
        private Timer timmer = new Timer(200, new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                Random indexRandom = new Random();
                final int index = indexRandom.nextInt(50);
                Random valRandom = new Random();
                final int val = valRandom.nextInt(600);
                SwingUtilities.invokeLater(new Runnable() {
                    public void run() {
                        notRepaint = false;
                        TestTableScreen.this.update(index + "|" + val);
        public TestTableScreen(String title) {
            this.title = title;
            init();
            tableModel1.setTabelName(title);
        public void startTime() {
            timmer.start();
        public String getTitle() {
            return title;
        public void update(String updateStr) {
            String[] val = updateStr.split("\\|");
            if (val.length == 2) {
                int index = Integer.valueOf(val[0]);
                List vals = tableModel1.getVector();
                if (vals.size() > index) {
                    vals.set(index, val[1]);
    //                 tableModel1.fireTableRowsUpdated(index, index);
                } else {
                    vals.add(val[1]);
    //                 tableModel1.fireTableRowsUpdated(vals.size() - 1, vals.size() - 1);
                tableModel1.fireTableDataChanged();
        public TableModel getTableModel() {
            return tableModel1;
        public void init() {
            testTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
            testTable.setRowSelectionAllowed(true);
            this.testTable.setModel(tableModel1);
            int[] width = { 160, 80, 45, 98, 60, 88, 87, 88, 80, 70, 88, 80, 75, 87, 87, 41, 88, 82, 75, 68, 69 };
            TableColumnModel columnModel = testTable.getColumnModel();
            for (int i = 0; i < width.length; i++) {
                columnModel.getColumn(i).setPreferredWidth(width[i]);
            testTable.setRowHeight(20);
            tableModel1.fireTableDataChanged();
            this.setLayout(new BorderLayout());
            TableColumnModel columnMode2 = testTable.getColumnModel();
            int[] width2 = { 200 };
            for (int i = 0; i < width2.length; i++) {
                columnMode2.getColumn(i).setPreferredWidth(width2[i]);
            scrollPane.getViewport().add(testTable);
            scrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
            this.add(scrollPane, BorderLayout.CENTER);
        class MyTableModel extends DefaultTableModel {
            public List list = new ArrayList();
            String titles[] = new String[] { "袨怓1", "袨怓2", "袨怓3", "袨怓4", "袨怓5", "袨怓6", "袨怓7", "袨怓8", "袨怓9", "袨怓10", "袨怓11",
                    "袨怓12", "袨怓13", "袨怓14", "袨怓15", "袨怓16", "袨怓17", "袨怓18", "袨怓19", "袨怓20", "袨怓21" };
            String tabelName = "";
            int type_head = 0;
            int type_data = 1;
            int type = 1;
            public MyTableModel(int type) {
                super();
                this.type = type;
                for (int i = 0; i < 50; i++) {
                    list.add(i);
            public void setTabelName(String name) {
                this.tabelName = name;
            public int getRowCount() {
                if (list != null) {
                    return list.size();
                return 0;
            public List getVector() {
                return list;
            public int getColumnCount() {
                if (type == 0) {
                    return 1;
                } else {
                    return titles.length;
            public String getColumnName(int c) {
                if (type == 0) {
                    return "head";
                } else {
                    return titles[c];
            public boolean isCellEditable(int nRow, int nCol) {
                return false;
            public Object getValueAt(int r, int c) {
                if (list.size() == 0) {
                    return null;
                switch (c) {
                default:
                    if (type == 0) {
                        return r + " " + c + "  test ";
                    } else {
                        return list.get(r) + "   " + c;
        public boolean isNotRepaint() {
            return notRepaint;
        public void setNotRepaint(boolean notRepaint) {
            this.notRepaint = notRepaint;
    public class TestPanel extends JPanel {
        protected String title = "";
        protected boolean needRepaint = false;
        protected boolean isFirstOpen = true;
        public String getTitle() {
            return title;
        public void setNeedRepaint(boolean flag) {
            this.needRepaint = flag;
        public boolean isNeedRepaint() {
            return needRepaint;
        public boolean isFirstOpen() {
            return isFirstOpen;
        public void setFirstOpen(boolean isFirstOpen) {
            this.isFirstOpen = isFirstOpen;
    public class TestJLableScreen extends TestPanel {
        private static final long serialVersionUID = 1L;
        private JLabel[] allLables = new JLabel[20];
        private Timer timmer = new Timer(20, new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                Random indexRandom = new Random();
                final int index = indexRandom.nextInt(10);
                Random valRandom = new Random();
                final int val = valRandom.nextInt(600);
                SwingUtilities.invokeLater(new Runnable() {
                    public void run() {
                        TestJLableScreen.this.setNeedRepaint(true);
                        TestJLableScreen.this.update(index + "|" + val);
        public TestJLableScreen(String title) {
            this.title = title;
            init();
        public void startTime() {
            timmer.start();
        public String getTitle() {
            return title;
        public void update(String updateStr) {
            String[] val = updateStr.split("\\|");
            if (val.length == 2) {
                int index = Integer.valueOf(val[0]);
                allLables[index * 2 + 1].setText(val[1]);
        public void init() {
            this.setLayout(new GridLayout(10, 2));
            boolean flag = true;
            for (int i = 0; i < allLables.length; i++) {
                allLables[i] = new JLabel() {
                    // public void setText(String text) {
                    // super.setText(text);
                    // // System.out.println("  setText " + getTitle() + "   ; " + this.getName());
                    public void paint(Graphics g) {
                        super.paint(g);
                        // System.out.println("  paint " + getTitle() + "   ; " + this.getName());
                    // public void repaint() {
                    // super.repaint();
                    // System.out.println("  repaint " + getTitle() + "   ; " + this.getName());
                allLables[i].setName("" + i);
                if (i % 2 == 0) {
                    allLables[i].setText("Name " + i + "  : ");
                } else {
                    allLables[i].setOpaque(true);
                    if (flag) {
                        allLables[i].setBackground(Color.YELLOW);
                        flag = false;
                    } else {
                        allLables[i].setBackground(Color.CYAN);
                        flag = true;
                    allLables[i].setText(i * 8 + "");
            for (int i = 0; i < allLables.length; i++) {
                this.add(allLables[i]);
    public class CustomeInternalFrame extends JInternalFrame {
        protected TestPanel panel;
        public CustomeInternalFrame() {
            this("", false, false, false, false);
        public CustomeInternalFrame(String title) {
            this(title, false, false, false, false);
        public CustomeInternalFrame(String title, boolean resizable) {
            this(title, resizable, false, false, false);
        public CustomeInternalFrame(String title, boolean resizable, boolean closable) {
            this(title, resizable, closable, false, false);
        public CustomeInternalFrame(String title, boolean resizable, boolean closable, boolean maximizable) {
            this(title, resizable, closable, maximizable, false);
        public CustomeInternalFrame(String title, boolean resizable, boolean closable, boolean maximizable,
                boolean iconifiable) {
            super(title, resizable, closable, maximizable, iconifiable);
        public TestPanel getPanel() {
            return panel;
        public void setPanel(TestPanel panel) {
            this.panel = panel;

    i had the same problem with buttons and it seemed that i overlayed my button with something else...
    so check that out first do you put something on that excact place???
    other problem i had was the VAJ one --> VisualAge for Java (terrible program)
    it does strange tricks even when you don't use the drawing tool...
    dunno 2 thoughts i had... check it out...
    SeJo

Maybe you are looking for

  • IMPORT a VIEW from an export dump file

    I'm trying to import a view from an export dump file. In using the Import Utility, do I use the TABLE parameter and give the View name ie: TABLES=view1 null

  • Image Preview in Sharepoint 2013 Online Search Results

    Hi i am using Sharepoint 2013  online Office 365. In my search page i can view the preview from picture library. But when i am searching document library i can only see the preview of pdf, excel, word etc... not image. Why image file not previewing f

  • When I click on "Download now",I go to a page that has no download buttons.

    When I click on "Download now",I go to page with tips, etc, but no button to download Firefox? Is IE8 intentionally stopping me from getting another browser?Does anyone know how to get around this?

  • I can't sign PDFs with images

    Hello everyone, I'm on a Mac OSX 10.8.5 and I am trying to follow these instructions: AMS Financial Aid Forms by Rachael Arestad on Prezi using Adobe Reader 11.0.10. However, there are a couple problems that come up. 1) I can't print the PDF as a PDF

  • Uninstall preinstalled applications

    Hi: I just got a Nokia 6650 from ATT wireless that comes with many applications that require subscriber fees that I do not want.  However, the normal uninstall through the Apps Manager will not work, resulting in the error mesage "Uninstallation not