Right click event on dynamic alv

Hi,
I have a dynamic editable alv built on my webdynpro screen. Now the requirment is in the first column of the alv if the user right clicks on the cell a menu should come which has two be filled with custom menus.
Please let me know how that can be acheived.

Hi,
Lekha's suggestion is working. I have done this already. it is an work around and it is not elegant as context_menu.
We have seen and also discussed in this form that the classes
CL_SALV_WD_UIE_IMAGE
CL_SALV_WD_UIE_TEXT_VIEW
are having getter and setters for menu but they are simply not working. I am not able to get them worked. I haven't heard anybody succeed in that.
So my advice, follow the workaround and save your time on this research.

Similar Messages

  • Right Click Event C#

    Hi,
    Is it the right way to use the right click event to delete row in Matrix?
    Could you please give me the template method for right click event?
    Thank you,
    Rune

    private void m_Application_EventRightClick(ref SAPbouiCOM.ContextMenuInfo oContextMenuInfo, out bool BubbleEvent)
                BubbleEvent = true;
                string vm_Column_ID_string = oContextMenuInfo.ColUID;
                string vm_EventType_string = Convert.ToString(oContextMenuInfo.EventType);
                string vm_Form_ID_string = oContextMenuInfo.FormUID;
                string vm_Item_ID_string = oContextMenuInfo.ItemUID;
                Int32 vm_Row_Int32 = oContextMenuInfo.Row;

  • Right Click Event & Link To

    Hi All,
    What is the use of LinkTo Property in Item Object. What is the advantage of it
    When the Right Click Event Fires. I tried on form  but doesn't work.

    Hi Manish,
    oItem.LinkTo is used for
    1. Labels (StaticText) to get the "white line" that connects the edittext.
    2. Links/Orange Arrow (LinkedButton) to connect them with a edittext. than the Arrow knows where to take
    the value from
    the RightClick Event is in an own EventHandler ! also be sure you enabled it in your EventFilter
    lg David

  • Add row by right click event

    hello expert
    i want to create add row functionality by right click event like in SAP B1 when we click on matrix colum it give menu for Remove,copy,add row in matrix how i do it by in my userdefiend form matrix

    Hello,
    If you enable the menu on your form Add row (menu id: 1292), Del Row  (menu id: 1293 )it will automatically appear in right click .
    copy should be added indivudally, and developed the functionality for each
    enable them:
    oForm.EnableMenu("1292", True)
                oForm.EnableMenu("1293", True)
    You can use MenuEvent to add/del/copy rows in the matrix or RightClickEvent
    Regards,
    J.

  • Create a right click event...

    Hi,
    I want to create a right click event programmatically in my Swing application.
    Can anyone tell me how do I do this? I have the listener and the code that works for my required functionality, but it requires me to right click explicitly. And, I wanted to simulate a right click so that I can execute this part of the code in the listener. Is there any way to do it?
    Thanks in advance...

    I wanted to simulate a right click so that I can execute this part of the code in the listener1) Create a method that can be invoke directly by the listener and your program.
    or
    2a) Create a MouseEvent
    2b) use the dispatchEvent(...) method of the Component class to send the event to the object.

  • Right-Click Event Matrix

    Good Morning
    Experts:
    I have added several options(SAP and Custom) to the Right-Click event.  It works as designed when Right-Clicking on the Matrix.  However, when Right-Clicking anywhere else on the screen, the options are still displayed.
    How can I restrict the options to only be displayed when Right-Clicking on a Matrix?
    Thanks,
    EJD

    Hi Ed,
    The right click event is completely separate event (ie it is not an EventType within the ItemEvent).
    So to code it (C#):
    private void _sboApp_RightClickEvent(ref SAPbouiCOM.ContextMenuInfo EventInfo, out bool BubbleEvent)
         BubbleEvent = true;
         if(EventInfo.FormUID == "MYFORM")
              // Do some stuff
    You also need to have defined the event while initialising the application object:
    this._sboApp.RightClickEvent += new SAPbouiCOM._IApplicationEvents_RightClickEventEventHandler(this._sboApp_RightClickEvent);
    There's an example project in the UI section of the SDK samples (number 22).
    Kind Regards,
    Owen

  • Right click event on a matrix

    Hi All
    I have to capture the right click event on a matrix
    here is my code
    <B1Listener(BoEventTypes.et_RIGHT_CLICK, True)> _
            Public Overridable Function OnBeforeRightClick(ByVal pVal As ContextMenuInfo) As Boolean
                Dim form As Form = B1Connections.theAppl.Forms.Item(pVal.FormUID)
                'ADD YOUR ACTION CODE HERE ...
                If pVal.ItemUID = "matItems" Then
                    ' do something
                End If
                Return True
            End Function
    the problem is that pVal.ItemUID always return null.
    Can any one help me
    Regards
    Arun TB
    Edited by: aruntb on Jul 14, 2010 9:39 PM

    Solved

  • Sending a right click event

    hello!
    is there a way to send a right click event?
    After a certain action I want to open the right click menu on the current form.
    any ideas?

    Here is my solution:
            private const uint MOUSEEVENTF_RIGHTDOWN = 0x0008;
            private const uint MOUSEEVENTF_RIGHTUP = 0x0010;
            [System.Runtime.InteropServices.DllImport("user32.dll")]
            private static extern void mouse_event(
            UInt32 dwFlags, // motion and click options
            UInt32 dx, // horizontal position or change
            UInt32 dy, // vertical position or change
            UInt32 dwData, // wheel movement
            IntPtr dwExtraInfo // application-defined information
            public static void SendClick(System.Drawing.Point location)
                System.Windows.Forms.Cursor.Position = location;
                mouse_event(MOUSEEVENTF_RIGHTDOWN, 0, 0, 0, new System.IntPtr());
                mouse_event(MOUSEEVENTF_RIGHTUP, 0, 0, 0, new System.IntPtr());
    I placed this code into the method where I want to do a rightclick (position):
    SendClick(position);

  • B1DE Right Click Event

    Hi all,
    I am working with B1DE and the Right click Event doesn't fire at all?
    anybody knows why?

    Yes you are correct. This is a bug and it will be fixed
    in the next release of B1DE planned to appear on SDN this month.

  • Right Click event name.

    Hi All,
    When I am doing right click on under red color rectangle( ISU data Generator) It giving  three option when i clicking in first option Crete data a new sub screen is open, How to know which screen is going to call on create data screen, Not able to find through Debug Mode.

    Hi mohd,
    In ALV tree the event for right-click is node_context_menu_request .
    I hope you to find the code...
    Regards

  • Right click event??

    Hey all,
    is there an event for the right click on a canvas/datagrid
    etc etc??
    My context menu is rather dynamic and highly depends on the
    are where the right click happened. This right click also is part
    of a overall framework through my desktop OS I am developing. The
    problem I am now facing is that for each
    The problem currently is that for each ItemRollOver this
    event's get fires and a new context menu get's created. I rather do
    this before the context menu get's displayed (only once).
    Is this possible at all or is it that using a context menu is
    jats not a good idea because Adobe Flash is managing that?
    Ries

    @Greg: This is based on Flex and I couldn't see how I can
    respond to a right click, they also don't seem to be available on
    the components in general.
    @ericbelair: Thanks for the link but the demo shows that the
    context menu was already created during initialization.
    In my case I need to generate the context menu when the right
    mouse is pressed and before the menu is displayed.
    Ries

  • How to add Select event in dynamic ALV

    Hi,
    I have created dynamic ALV and now i want to checked the selected row value.
    If in the selected row contain 'A' value then i have to disable the Button given on the screen.
    If in the selected row contain B' value then i have to enable the Button given on the screen.
    How to add the event once I select the row.
    I have done like this . but it is not
    lw_api_2->do_dynamic_navigation(
              source_window_name          = 'ZWDCHHR_EX_TASK_DELE'
              source_vusage_name          = 'ZWDVHHR_EX_TASK_DELE_USAGE_1'
              source_plug_name            = 'TO_ALV'
              target_component_name       = 'SALV_WD_TABLE'
              target_component_usage      = 'ALV_USAGE1'
              target_view_name            = 'TABLE'
              target_plug_name            = 'DEFAULT'
              target_embedding_position   = 'ZWDVHHR_EX_TASK_DELE/VIEW_DELEG_MY_TASKS' ).
      register event handler
        lw_cmp_usage_2->add_event_handler(
           listener        =  lw_api_2
           handler_name    = 'ONSELECT_TAB1'
           controller_name = 'INTERFACECONTROLLER'
           event_name      = 'ON_SELECT' ).
    Thanks and regards
    Amita Gandhi

    Hi Amita,
    You can try fetch the number of the row which was leadselected through R_PARAM->INDEX. (This would be just a normal integer variable. You can try check this out in debugging mode. ) Now you can just read the data of this row from the context node by saying as GET_ATTRIBUTE up on the nodes reference with the index as R_PARAM->INDEX.
    Regards,
    Uday

  • Handling double click event in oops alv

    I need to write a interactive alv where,can any one help me in handling double click event using oops.

    Hello,
    Demo program on interactive ALV using OOPS
    REPORT  ZALV_OOINTERACTIVE.*Class definition for handling double click
    CLASS event_class DEFINITION DEFERRED.*Internal table and work area declarations for dd02l and dd03l
    DATA : it_dd02l TYPE TABLE OF dd02l,
           wa_dd02l TYPE dd02l,
           it_dd03l TYPE TABLE OF dd03l,
           wa_dd03l TYPE dd03l.*data declarations for ALV Main list
    DATA : ty_lay1 TYPE lvc_s_layo,
           it_fieldcat TYPE lvc_t_fcat ,
           ty_fieldcat TYPE lvc_s_fcat ,
           c_alv1 TYPE REF TO cl_gui_alv_grid,
           c_cont1 TYPE REF TO cl_gui_custom_container,
           event_receiver TYPE REF TO event_class.*data declarations for ALV Interactive listDATA : ty_lay2 TYPE lvc_s_layo,
           it_fcat TYPE lvc_t_fcat ,
           ty_fcat TYPE lvc_s_fcat ,
           c_alv2 TYPE REF TO cl_gui_alv_grid,
           c_cont2 TYPE REF TO cl_gui_custom_container.
    **Select options for multiple values and NOT ranges
    SELECT-OPTIONS : s_table FOR wa_dd02l-tabname NO INTERVALS.
    Initialization event
    INITIALIZATION.*Start of selection event
    START-OF-SELECTION.*fetch data into table and field characteristics
      PERFORM fetch_data.*ALV display for output
      PERFORM alv_output.&----
    *&      Form  FETCH_DATA
          text
    -->  p1        text
    <--  p2        text
    FORM fetch_data .*Select the table details
      SELECT * FROM dd02l INTO CORRESPONDING FIELDS OF TABLE it_dd02l 
    WHERE tabname IN s_table
      AND tabclass = 'TRANSP'.
    ENDFORM.                    " FETCH_DATA----* CLASS lcl_event_receiver DEFINITION----CLASS event_class DEFINITION.*Handling double click
      PUBLIC SECTION.    METHODS:
        handle_double_click
        FOR EVENT double_click OF cl_gui_alv_grid IMPORTING e_row .ENDCLASS. "lcl_event_receiver DEFINITION
    ----* CLASS lcl_event_receiver IMPLEMENTATION
    ----CLASS event_class IMPLEMENTATION.  METHOD handle_double_click.    DATA : ls_dd02l LIKE LINE OF it_dd02l.*Reading the selected data into a variable
        READ TABLE it_dd02l INDEX e_row-index INTO ls_dd02l.*  *Select the field details of the selected table
        SELECT * FROM dd03l INTO CORRESPONDING FIELDS OF TABLE it_dd03l
        WHERE tabname EQ ls_dd02l-tabname.
    *calling the ALV containing the field values
        CALL SCREEN 101.  ENDMETHOD. "handle_double_clickENDCLASS. "lcl_event_receiver IMPLEMENTATION&----& Module pbo_100 OUTPUT&----
    *MODULE pbo_100 OUTPUT.
    *set pf-status 'XXX'.
    *set titlebar 'XXX'.
    ENDMODULE. " PBO_100 OUTPUT
    *& Module alv_100 OUTPUT
    &----MODULE alv_100 OUTPUT.*Check if there is no custom container in screen 100
      IF c_cont1 IS INITIAL.*Creating object of container
        CREATE OBJECT c_cont1
         EXPORTING
           container_name = 'CCONT'.
        IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.*Creating object of alv
        CREATE OBJECT c_alv1
           EXPORTING
            i_parent = c_cont1.
        IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.*alv layout
        PERFORM alv_100_layout.*alv field catalogue
        PERFORM alv_100_fieldcat.*Displaying the ALV grid
        CALL METHOD c_alv1->set_table_for_first_display
          EXPORTING
            is_layout       = ty_lay1
          CHANGING
            it_outtab       = it_dd02l[]
            it_fieldcatalog = it_fieldcat.    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.*Create object of the event class and setting handler for double click
        CREATE OBJECT event_receiver.
        SET HANDLER event_receiver->handle_double_click FOR c_alv1.  ENDIF.ENDMODULE. " ALV_100 OUTPUT&----& Module pai_100 INPUT&----
    *MODULE pai_100 INPUT.
    ENDMODULE. " pai_100 INPUT----* MODULE PBO_101 OUTPUT----MODULE pbo_101 OUTPUT.
    SET PF-STATUS 'XXX'.
    SET TITLEBAR 'XXX'.
    ENDMODULE. " PBO_101 INPUT----* MODULE ALV_101 OUTPUT----
    MODULE alv_101 OUTPUT.
    *Check if the Custom container exists.
      IF c_cont2 IS INITIAL.*Creating container object
        CREATE OBJECT c_cont2
          EXPORTING
            container_name = 'CDCONT'.
        IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.*creating ALV grid for interactive list
        CREATE OBJECT c_alv2
          EXPORTING
           i_parent = c_cont2.
        IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.*ALV layout
        PERFORM alv_101_layout.*ALV fieldcatalogue
        PERFORM alv_101_fieldcat.*Sorting the output by field position
        SORT it_dd03l BY position.*ALV for display field details
        CALL METHOD c_alv2->set_table_for_first_display
          EXPORTING
            is_layout       = ty_lay2
          CHANGING
            it_outtab       = it_dd03l[]
            it_fieldcatalog = it_fcat.
        IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.  ENDIF.ENDMODULE. " ALV_101 OUTPUT
    &----& Module PAI_101 INPUT&----
    *MODULE pai_101 INPUT.ENDMODULE. " PAI_101 INPUT
    *&      Form  ALV_OUTPUT
          text
    -->  p1        text
    <--  p2        text
    FORM alv_output .
      CALL SCREEN 100.ENDFORM.                    " ALV_OUTPUT
    *&      Form  ALV_100_LAYOUT
          text
    -->  p1        text
    <--  p2        text
    FORM alv_100_layout .  ty_lay1-grid_title = 'TABLES'.
      ty_lay1-zebra = 'X'.
      ty_lay1-no_toolbar = 'X'.ENDFORM.                    " ALV_100_LAYOUT
    *&      Form  ALV_100_FIELDCAT
          text
    -->  p1        text
    <--  p2        text
    FORM alv_100_fieldcat .
      CLEAR ty_fieldcat.
      ty_fieldcat-row_pos = 1.
      ty_fieldcat-col_pos = 1.
      ty_fieldcat-fieldname = 'TABNAME'.
      ty_fieldcat-tabname = 'GT_DD02L'.
      ty_fieldcat-coltext = 'TableName'.
      ty_fieldcat-outputlen = 10.
      APPEND ty_fieldcat TO it_fieldcat.
      CLEAR ty_fieldcat.  ty_fieldcat-row_pos = 1.
      ty_fieldcat-col_pos = 2.
      ty_fieldcat-fieldname = 'TABCLASS'.
      ty_fieldcat-tabname = 'GT_DD02L'.
      ty_fieldcat-coltext = 'CATEGORY'.
      ty_fieldcat-outputlen = 10.
      APPEND ty_fieldcat TO it_fieldcat.
      CLEAR ty_fieldcat.  ty_fieldcat-row_pos = 1.
      ty_fieldcat-col_pos = 3.
      ty_fieldcat-fieldname = 'AS4USER'.
      ty_fieldcat-tabname = 'GT_DD02L'.
      ty_fieldcat-coltext = 'CREATED'.
      ty_fieldcat-outputlen = 10.
      APPEND ty_fieldcat TO it_fieldcat.
      CLEAR ty_fieldcat.  ty_fieldcat-row_pos = 1.
      ty_fieldcat-col_pos = 4.
      ty_fieldcat-fieldname = 'AS4DATE'.
      ty_fieldcat-tabname = 'GT_DD02L'.
      ty_fieldcat-coltext = 'DATE'.
      ty_fieldcat-outputlen = 10.
      APPEND ty_fieldcat TO it_fieldcat.
      CLEAR ty_fieldcat.
      ty_fieldcat-row_pos = 1.
      ty_fieldcat-col_pos = 5.
      ty_fieldcat-fieldname = 'AS4TIME'.
      ty_fieldcat-tabname = 'GT_DD02L'.
      ty_fieldcat-coltext = 'TIME'.
      ty_fieldcat-outputlen = 10.
      APPEND ty_fieldcat TO it_fieldcat.
      CLEAR ty_fieldcat.  ty_fieldcat-row_pos = 1.
      ty_fieldcat-col_pos = 6.
      ty_fieldcat-fieldname = 'CONTFLAG'.
      ty_fieldcat-tabname = 'GT_DD02L'.
      ty_fieldcat-coltext = 'Delivery Class'.
      ty_fieldcat-outputlen = 15.
      APPEND ty_fieldcat TO it_fieldcat.
      CLEAR ty_fieldcat.ENDFORM.                    " ALV_100_FIELDCAT
    *&      Form  ALV_101_LAYOUT
          text
    -->  p1        text
    <--  p2        text
    FORM alv_101_layout .  ty_lay2-grid_title = 'FIELDS'.
      ty_lay2-zebra = 'X'.
      ty_lay2-no_toolbar = 'X'.ENDFORM.                    " ALV_101_LAYOUT
    *&      Form  ALV_101_FIELDCAT
          text
    -->  p1        text
    <--  p2        text
    FORM alv_101_fieldcat .  REFRESH it_fieldcat.
      REFRESH it_fcat.
      CLEAR ty_fcat.  ty_fcat-row_pos = 1.
      ty_fcat-col_pos = 1.
      ty_fcat-fieldname = 'FIELDNAME'.
      ty_fcat-tabname = 'GT_DD03L'.
      ty_fcat-coltext = 'Fieldname'.
      ty_fcat-outputlen = 10.
      APPEND ty_fcat TO it_fcat.
      ty_fcat-row_pos = 1.
      ty_fcat-col_pos = 2.
      ty_fcat-fieldname = 'CHECKTABLE'.
      ty_fcat-tabname = 'GT_DD03L'.
      ty_fcat-coltext = 'CHECKTABLE'.
      ty_fcat-outputlen = 10.
      APPEND ty_fcat TO it_fcat.  ty_fcat-row_pos = 1.
      ty_fcat-col_pos = 3.
      ty_fcat-fieldname = 'KEYFLAG'.
      ty_fcat-tabname = 'GT_DD03L'.
      ty_fcat-coltext = 'Key Flag'.
      ty_fcat-outputlen = 10.
      APPEND ty_fcat TO it_fcat.ENDFORM.                    " ALV_101_FIELDCAT

  • How can i disable mouse right clicking event

    I need in my project to disallow any body to right click the mouse. Can i disable this event to prevent user of the application from right clicking if yes how can i disable it.

    I have code written in Visual Basic doing the same task but i don't know how to transfer those code in java
    The following is a code for that:
    Option Explicit
    'declares
    Public Declare Function SetWindowsHookEx Lib "user32" Alias "SetWindowsHookExA" (ByVal idHook As Long, ByVal lpfn As Long, ByVal hmod As Long, ByVal dwThreadId As Long) As Long
    Public Declare Function UnhookWindowsHookEx Lib "user32" (ByVal hHook As Long) As Long
    Public Declare Function CallNextHookEx Lib "user32" (ByVal hHook As Long, ByVal nCode As Long, ByVal wParam As Long, lParam As Any) As Long
    'constant
    Private Const WH_MOUSE_LL = 14&
    Public Const HC_ACTION = 0&
    Public Const WM_RBUTTONDOWN = &H204
    Public Const WM_RBUTTONUP = &H205
    Public Const VK_RBUTTON = &H2
    Private lMShook As Long
    Private bHookEnabled As Boolean
    'functions which process mouse events
    Public Function MouseProc(ByVal nCode As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
    If nCode = HC_ACTION Then
    If (wParam = WM_RBUTTONUP Or wParam = WM_RBUTTONDOWN) Then
    MouseProc = 1
    Exit Function
    End If
    End If
    MouseProc = CallNextHookEx(lMShook, nCode, wParam, lParam)
    End Function
    Public Function SetHook()
    If lMShook = 0 Then
    lMShook = SetWindowsHookEx(WH_MOUSE_LL, AddressOf MouseProc, App.hInstance, 0&)
    End If
    If lMShook = 0 Then
    MsgBox "failed to install hook :" & lMShook & " : " & WH_MOUSE_LL
    bHookEnabled = False
    Unload Form1
    Exit Function
    Else
    bHookEnabled = True
    End If
    End Function
    Public Function UnSetHook()
    If bHookEnabled Then
    Call UnhookWindowsHookEx(lMShook)
    lMShook = 0
    End If
    bHookEnabled = False
    End Function
    Public Function InstalledHook()
    MsgBox " installed hook is :" & lMShook
    End Function
    code for form is below:
    Option Explicit
    Private Sub Command1_Click()
    InstalledHook
    End Sub
    Private Sub Command2_Click()
    Call SetHook
    End Sub
    Private Sub Command3_Click()
    Call UnSetHook
    End Sub
    Private Sub Form_Unload(Cancel As Integer)
    Call UnSetHook
    End Sub

  • Stop right click Event on JTabbedPane

    Hi,
    Does anyone know how to stop tabbed pane changing by right click of the mouse? I still want left click to change.
    Thanks a lot.
    Qian

    The proper way to do this is to write a custom UI as this behaviour is controlled by the UI.
    As a quick hack you can replace the deault MouseListener with a custom MouseListener. The listener code below was taken from the BasicTabbedPaneUI and slightly modified:
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class TabbedPaneNoRightClick extends JFrame
        public TabbedPaneNoRightClick()
            JTabbedPane tabbedPane = new JTabbedPane();
            getContentPane().add(tabbedPane);
            newTab(tabbedPane, "one");
            newTab(tabbedPane, "two");
            newTab(tabbedPane, "three");
            newTab(tabbedPane, "four");
            MouseListener[] ml = (MouseListener[])tabbedPane.getListeners(MouseListener.class);
            for (int i = 0; i < ml.length; i++)
                tabbedPane.removeMouseListener( ml[i] );
            tabbedPane.addMouseListener(new MouseAdapter()
                public void mousePressed(MouseEvent e)
                    JTabbedPane tabbedPane = (JTabbedPane)e.getSource();
                    if (!tabbedPane.isEnabled()
                    ||  SwingUtilities.isRightMouseButton( e ))  // added
                        return;
                    // int tabIndex = getTabAtLocation(e.getX(), e.getY()); // changed
                    int tabIndex = tabbedPane.getUI().tabForCoordinate(tabbedPane, e.getX(), e.getY());
                    if (tabIndex >= 0 && tabbedPane.isEnabledAt(tabIndex))
                        if (tabIndex == tabbedPane.getSelectedIndex())
                            if (tabbedPane.isRequestFocusEnabled())
                                tabbedPane.requestFocus();
                                //tabbedPane.repaint(getTabBounds(tabPane, tabIndex)); // changed
                                tabbedPane.repaint(tabbedPane.getUI().getTabBounds(tabbedPane, tabIndex));
                        } else
                            tabbedPane.setSelectedIndex(tabIndex);
        private void newTab(JTabbedPane tabbedPane, String text)
            JLabel label = new JLabel(text);
            tabbedPane.addTab( text, label );
        public static void main(String args[])
            TabbedPaneNoRightClick frame = new TabbedPaneNoRightClick();
            frame.setDefaultCloseOperation( EXIT_ON_CLOSE );
            frame.setSize(200, 100);
            frame.setLocationRelativeTo( null );
            frame.setVisible(true);
    }

Maybe you are looking for

  • Bridge doesn't recognize processor

    Hello, I'm using Bridge CS3 2.1.1.9 under MS Vista Home Premium, Processor is a Intel Dual Core E8200. After starting Bridge, I get the message (copied from a different thread): Adobe Bridge This application requires an Intel Pentium 4, Intel Celeron

  • HT201150 The allow power button to put computer to sleep is missing in the preferences on my MB Air?

    The allow power button to put computer to sleep is missing in the preferences on my MB Air? I have the funtion but no way to turn it off?

  • Manual for the touchpad

    Hi... I just got one of these HP touchpad 16 gb but I have no clue how to use it . Can someone point me in the right direction for the manual and if their is a How To in using it . Also any pointer that I need to know . thanks Post relates to: HP Tou

  • Intel Imac fan speed? normal ?

    Hi guys , im a new mac user and i was wondering i downloaded istat pro and i noticed a low humming noise when running so i lookd at the fan speed and the cpu 1200 harddrive 1600 optical drive 800 im not sure if those are good temps but liek some time

  • CS4 RAM preview slow

    Ever since I installed CS4 nothing will RAM preview over 8 frames a second. I am running on a Mac Pro 2x2.8 quad core Intel, 8gig Ram, files are on a Raid 5 XSAN storage with 31 terabytes of space... I've tried everything I can think of. I even impor