To disappear / disable buttons on title bar of JDialog

hi,
i want a non-modal JDialog without any buttons on tilte bar.
i.e i dont want to have the X close button on tilte bar. how can i achieve this
thanx

by setting undecorated true whole of the tilte bar goes off. but i just want
to remove the close button on title bar. any how i found the soln by setting
setDefaultLookAndFeelDecorated(true) which removes the close button
from title bar.
if there is any other method plz suggest

Similar Messages

  • Creating buttons on title bar using alv

    hi all good morning,
    can any one help me in making a button on title bar of ALV report. Till now i have used only one function of ALV i,e REUSE_ALV_GRID_DISPLAY. it is showing proper out put but i want to make some action using my own button on the final ALV result displayed like save change etc.

    Hi,
    How to add button to ALV toolbar using REUSE_ALV_LIST_DISPLAY?
    In the program which calls ALV using REUSE_ALV_LIST_DISPLAY,
    I have to add a new button.
    I saw the demo program BCALV_GRID_08, which is written using ABAP-Controls.
    In that example, the button is added using TOOLBAR event of cl_gui_alv_grid.
    Could you help me to implement the same logic using REUSE_ALV_LIST_DISPLAY parameters.
    you should copy the 'STANDARD' GUI status from program SAPLKKBL using transaction SE90 >Programming SubObjects> Gui Status.
    Execute this transaction to get to next screen. select status using checkbox. click on GUI Status --> Copy.
    Enter your Z program name and the name you what for this status - you can keep it as 'STANDARD' to be simple.
    Then you can edit the new status to add or delete buttons. This will also bring in the standard SAP ALV functionality such as sorting/subtotaling etc...
    When you call 'REUSE_ALV_GRID_DISPLAY' make sure you pass it the new status name.
    an example of one of mine:
    call function 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    i_callback_program = 'ZSDBOLST_REPORT'
    i_callback_pf_status_set = 'STANDARD' <----
    i_callback_user_command = 'USER_COMMAND'
    i_structure_name = 'I_BOLACT'
    i_grid_title = 'BOL Action Report'(031)
    is_layout = gs_layout
    it_fieldcat = gt_fieldcat[]
    i_save = 'A'
    is_variant = v_variant
    TABLES
    t_outtab = i_bolact
    EXCEPTIONS
    program_error = 1
    others = 2.
    I just tried the same procedure ,but my entire application toolbar disappeared and a lock icon appears next to the application toolbar in my copied pf-status.
    Could you advice what might have gone wrong ?
    As identified with the FM's help you can do the following.
    1). Using SE80 (I think) you can copy a GUI status from one program to another. It mentions which one in the FM's help.
    2). Create a form named like so:
    Code:
    Form Set_pf_status
    Notes: Called by FM REUSE_ALV_GRID_DISPLAY
    FORM set_pf_status USING rt_extab TYPE slis_t_extab.
    SET PF-STATUS 'ZSTANDARD'.
    ENDFORM. "Set_pf_status
    In the above case the GUI status copied was named ZSTANDARD and adjusted accordingly, adding and removing the desired buttons. A button was added called '%DELETE'.
    3). Create the following report:
    Code:
    Form User_command
    Notes: Called by FM REUSE_ALV_GRID_DISPLAY
    Detects whether the icon/button for
    'Return Tag Deletion' has been pressed. If it has then
    detect whether any rows have been highlighted and then
    set the delete flag.
    FORM user_command USING r_ucomm LIKE sy-ucomm
    rs_selfield TYPE slis_selfield.
    DATA: li_count TYPE I.
    IF r_ucomm EQ '%DELETE'.
    LOOP AT %g00 WHERE mark EQ 'X'.
    ADD 1 TO li_count.
    ENDLOOP.
    IF li_count GT 0.
    gc_delete_flag = 'X'.
    r_ucomm = '&F03'. "Back arraow
    ELSE.
    MESSAGE W000 WITH 'Please highlight the rows to be deleted!'.
    ENDIF.
    ENDIF.
    ENDFORM. "User_command
    As I've added an extra button to indicate which records should be deleted I need to identify a form to be called to process when this button is chosen.
    Then when you call the ALV function you to specify the following extra details:
    Code:
    call function 'REUSE_ALV_GRID_DISPLAY'
    exporting i_callback_program = gc_repid
    I_CALLBACK_PF_STATUS_SET = 'SET_PF_STATUS'
    I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
    i_grid_title = lc_grid_title
    is_layout = lc_layout
    it_fieldcat = gt_fieldcat
    it_sort = sort
    i_save = l_save
    is_reprep_id = l_bbs_id
    is_variant = l_variant
    tables t_outtab = %g00
    exceptions program_error = 1
    others = 2.
    The parameters in capitals are the extra ones that need to be added.
    Regards,
    Satish

  • Removing the minimize button from Title bar...

    Hi,
    I have created an desktop application using swing. I dont need minimized button on title bar of the main window. I searched a lot but could not find a solution. Can I get some useful links.
    What can I do ?
    Thanks

    Actually I want if the application is minimized, its state should not changed to iconified but it simple because hidden. And using the tray icon's option if application is open, it simple make the application visible. I did not want the following case which is happening right now.
    Case:
    1. I Minimized the application
    2. My application state becomes the iconified and it becomes hidden (As I have implemented the windowlistener)
    3. I used trayicon's Open option (it simply visible the application)
    4. Application becomes visible, but it is in iconified state. Because previously its state has been changed due to minimized button.I want whenever the Open option of tray icon is used, application must be visible in Maximized state. That why I also did on action listener of Open option
                            application.setState(NORMAL);
                            application.setExtendedState(MAXIMIZED_BOTH);
                            application.setVisible(true);That's why I planned to removed the minimize button from Title bar. But if it not possible then how can I avoid changing state of application when minimized button is used.
    thanks
    Jawahar Nayak

  • Add maximumsize icon to title bar in JDialog

    My question is how to add a maximumsize icon to the title bar of JDialog, i want to create a dialog that when user double-click the JDialog's title bar or click the maximumsize icon in the JDialog's title bar the dialog can be displayed as maximum size. it just likes Frame.
    Thanks in advance!
    lupeng
    [email protected]

    Hi Lupeng,
    I can think of 2 approaches, firstly and probably the most easiest is to use a frame to mimic the behaviour of the dialog.
    Secondly, implement your own L&F for dialogs by wrting your own RootPaneUI that uses your own version of TitlePane. The TitlePane class will take care of the buttons and mouse handling. Have a look at BasicRootPaneUI to get a better understanding of the implementation ;)
    N35Sy

  • Issue with the FR translation for toolbar buttons and title bar

    Hi All,
    In a report program I have a toolbar with some custom buttons and icons (GI Status) and I have a title bar (GUI Title) with the report heading.
    I have FR translations defined for them in SE63, but they are not actually displayed when I run report in FR language.
    All other translation work fine, only GUI Status and GUI Title translations donu2019t work.
    Your help will be highly appreciated.
    Sagar

    hi sagar,
    1.go to se41
    2. give the report name
        and status name.
    3.then change mode
    then click on application tool bar
    4.menu GOTO---->TRANSLATION
    5. here you can change from EN to FR
    reward me if it is useful
    thanks
    AM

  • Disabling close 'X' icon in the title bar of JDialog

    I found that JDialogs by default come up with the close 'X' icon. The only manipulation that can be done is by setting the DefaultCloseOperation.
    Is there some way I can avoid showing that icon on the title bar?
    My JDialog already has a 'Close' button and I have written an action listener for it. I dont want to listen to WindowEvents as well.

    JDialog d = new JDialog((Frame)c, true);
    d.setSize(400,300);
    d.setUndecorated(true);
    d.getRootPane().setWindowDecorationStyle(JRootPane.PLAIN_DIALOG);That bit of code seems to get rid of the title bar entirely and cause a MetalLookAndFeel dragging bar without an X to appear.
    Let me know if this is a satisfying solution
    My full test code followsimport java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class DyalogTest extends JFrame
       public DyalogTest()
          super("Dialog Test");
          setSize(500, 400);
          setDefaultCloseOperation(EXIT_ON_CLOSE);
          Container c = getContentPane();
          c.setLayout(new FlowLayout());
          JButton b = new JButton("Initiate Dialog");
          b.addActionListener(new ActionListener()
             public void actionPerformed(ActionEvent e)
                Component c = SwingUtilities.getRoot((Component)e.getSource());
                JDialog d = new JDialog((Frame)c, true);
                d.setUndecorated(true);
                d.getRootPane().setWindowDecorationStyle(JRootPane.PLAIN_DIALOG);
                JButton b = new JButton("Dispose");
                b.addActionListener(new ActionListener()
                   public void actionPerformed(ActionEvent e)
                      Component c = SwingUtilities.getRoot((Component)e.getSource());
                      JDialog d = (JDialog)c;
                      d.setVisible(false);
                      d.dispose();
                d.getContentPane().setLayout(new FlowLayout());
                JPanel p = new JPanel();
                p.setPreferredSize(new Dimension(400,300));
                p.setBorder(BorderFactory.createTitledBorder("Vanilla Dialog"));
                p.add(b);
                d.setContentPane(p);
                d.pack();
                d.setVisible(true);
          c.add(b);
       public static void main(String[] args)
          new DyalogTest().setVisible(true);
    }

  • Add new button on title bar of JFrame

    how can i add new button (like minimize, maximize and close) on title bar of JFrame.
    actually i want a new button for system try icon. if user click on this button JFrame will hide and system try icon will be visible

    Hi,
    Check out this Thread.
    Hope that help,
    Jack

  • Harcopy button visible title bar

    Hello,
    sometimes I see in some VI's a Hardcopy button visible in the window title bar (on the left of minimize/maximize and close button) but I fonud now way to configure this!
    Maybe this is a Windows functionality, but does some know how to setup this?

    I think you're referring to this:
    http://404techsupport.wordpress.com/2008/04/02/configuring-hardcopy-to-do-everything-you-want-and-mo...

  • Minimize, maximize, and close buttons in title bar...

    i have a mac, the tiger model, and my three buttons are grey. for safari and all other windows. usually they are red, green, and yellow, but mine are just grey. how, if i can, do i change these to the red, yellow, and green color? preferably without downloading any kind of application or program.

    The gadgets are gray if the window is not active. If you activate the window then their colors should return.

  • Fullscreen Tool Button in Title Bar

    Hi,
    I'm developing with the Developer Preview. I notice that several Windows 10 Apps have a tool button next to the minimize, restore, maximize buttons that is used to toggle full screen on and off. Its a diagonal double sided arrow. I don't get that for free
    in my Windows Store Application apparently. What do I have to do to get that tool button in my app?
    Thanks
    Brian

    I see what happened, the project you sent me is the result of the Windows 10 template, as you can see in the following screenshot:
    The template that adds the full screen toggle button that you describes, is in a different template, as you can see in the following screenshot:
    Hope this helps.

  • Creating the GUI Buttons on Tu0131tle Bar of the Reports

    Hi,
    How can i create the buttons on title bar of my report as CL_GOS_MANAGER?
    the CL_GOS_MANAGER interface is creating a button on title bar of a report to open gos manager popup window.
    i want to do same as this method. i want to create my button.
    Can somebody help me pls?
    Thanks.

    Thank you for your reply,
    i've created a gui button on title bar with this code at INITIALIZATION;
    DATA: lo_container TYPE REF TO cl_gui_gos_container,
            lo_dialogbox TYPE REF TO cl_gui_dialogbox_container,
            lo_toolbar TYPE REF TO cl_gui_toolbar.
      DATA: lo_menu TYPE REF TO cl_ctmenu.
      DATA lt_event TYPE cntl_simple_events.
      DATA ls_event TYPE cntl_simple_event.
      DATA lp_style TYPE i.
      DATA lp_icon TYPE iconname.
      DATA lp_butn_type TYPE tb_btype.
      DATA lp_url(30).
      DATA lp_quick TYPE iconquick.
      DATA lp_nobut TYPE c.
      GET PARAMETER ID 'SGOSNOBUT' FIELD lp_nobut.
      CHECK lp_nobut IS INITIAL.
      lp_style = cl_gui_control=>ws_visible.
    *  IF CL_GOS_STARTER->go_container IS INITIAL.
        CREATE OBJECT lo_container
          EXPORTING
            width             = 58
            no_autodef_progid_dynnr = 'X'
          EXCEPTIONS
            OTHERS            = 5
        CHECK sy-subrc = 0.
        CREATE OBJECT lo_toolbar
          EXPORTING parent = lo_container.
        CALL FUNCTION 'ICON_CREATE'
          EXPORTING
            name       = 'ICON_PDF'
            add_stdinf = space
          IMPORTING
            RESULT     = lp_icon
          EXCEPTIONS
            OTHERS     = 0.
    *    IF gp_frontend = 'ITS'.
    ** insert menubutton
    *      lp_butn_type = 2.
    *    ELSE.
    ** insert menubutton with default
    *      lp_butn_type = 1.
    *    ENDIF.
        lp_quick = text-001.
        CALL METHOD lo_toolbar->add_button
          EXPORTING
            fcode     = '%MY_BUTTON'
            icon      = lp_icon
            butn_type = lp_butn_type
            quickinfo = lp_quick.
    * register events as system events.
        CLEAR lt_event.
        ls_event-eventid = cl_gui_toolbar=>m_id_function_selected.
        ls_event-appl_event = space.
        APPEND ls_event TO lt_event.
        ls_event-eventid = cl_gui_toolbar=>m_id_dropdown_clicked.
        ls_event-appl_event = space.
        APPEND ls_event TO lt_event.
        CALL METHOD lo_toolbar->set_registered_events
          EXPORTING
            events = lt_event.
    *    SET HANDLER on_function_selected FOR lo_toolbar.
    *  ELSE.
    *    CALL METHOD show.
    *  ENDIF.
    *  SET HANDLER on_dropdown_clicked  FOR lo_toolbar.
      call method cl_gui_cfw=>flush.
    but i didn't find where button clicked is falling.
    Thanks again.

  • Setting icon in JDialog title bar.

    Hi all,
    Can u send me the code for setting the icon in the title bar of JDialog?
    Currently i'm working on linux.
    Is there any possible way to set it.

    1) Swing related questions should be posted in the Swing forum.
    2) Quit multi posting, you where given the answer yesterday when you originally posted this question.

  • Why did the browser window's title bar, menu, minimize, maximize, and close buttons all disappear, and how do I get them back?

    I am literally stuck in Firefox. Suddenly the window changed to full screen mode, and the title bar and Firefox menu disappeared, along with the close, minimize, and maximize buttons. All I can access are the menu bar and open browser tabs.
    I can't even access my dock (on Mac), which usually pops up when I mouse over the bottom of the screen.
    So, the only way it seems I can get out of Firefox is to shut down my computer by pressing the power button. Unless there is some keyboard shortcut. I tried command-11 but that just switched between open my browser tabs.
    FYI i have no idea what Ubuntu is and don't think I'm using it (that name seems to pop up when I google this problem)
    Oh yeah, also I'm using Firefox 3.6.2 because my elderly Mac is running on OSX 10.4.11. Have never had any problems with it before.

    IN your iTunes library, does the movie appear with a cloud on it for downloading?
    is the movie still in the iTunes Store?
    iTunes purchases the rights to sell a movie, but those are for a time limit.  If the right expires and apple doesn't renew, the movie is no longer available for download and must be saved in your library.   I suggest backing up your movies ASAP.  Check the store for this movie, perhaps it is still available. 

  • Title Bar Graphics Disappear

    Sometimes at random, elements of the title bar (the portion of the application window where the title is along with the minimize, maximize buttons are) will disappear. You are unable to view them until you roll over them and even the background turns white... like the graphics are getting corrupt. I see it a lot with the System Preferences panel.

    i've got a similar issue i think, what happens is for some reason, at some point, the dock changes 'texture' and becomes transparent, as in the white surface of it turns black reflecting the icons on it more brightly and the icon title becomes corrupt, worse still, my stacks show only the contour of the files and the titles are unreadable, although noting else seems to be affected, this is annoying.

  • Title bar blinks when using "Firefox" button

    Whenever the new "Firefox" drop-down menu is enabled (i.e. "Menu Bar" is disabled under View -> Toolbars -> Menu Bar), the title bar (the area of the window adjacent to the "Firefox" button and the minimize/maximize/close buttons) blinks every so often, seemingly randomly, usually a couple of times per minute. Note that when Menu Bar is enabled, no blinking occurs. This doesn't appear to affect performance, but it is pretty annoying. I'm running Windows 7 and I have the transparency options enabled.
    == This happened ==
    Every time Firefox opened
    == I installed Firefox 4 beta

    Firefox 4.0 is like 6 months from being released, you're using the first of many Beta versions.
    Bugs like that can be reported here:
    http://hendrix.mozilla.org/

Maybe you are looking for

  • Switch b/w edge and GSM on Blackberry Curve 9380

    Hey few days back I bought Blackberry Curve 9380. Basically I'm new to Blackberry Universe. Generally when I'm at home, I prefer to use GSM only coz I have Wi-Fi. But when I swtich off data usage, connect to Wi-Fi, the Browser and other internet appl

  • How to add new fields for FB01 transaction both at Header and Line item

    Hi Guys, I would like to add the new fields at header and item level in FB01 transaction. Can I acheive this by using transaction EEWB....please help me on this. Thanking you

  • Can't hear double-tracked keyboard in playback

    I recorded a piano track as a software instrument, and had no problems with hearing it in playback. Then, I duplicated the track and played the same thing. Now, when I try to play through the song, I can only hear one or the other, or neither. When I

  • CME and user services

    Can someone please tell me if CME allows users to configure their own speed dials and services using a url like on the CCM? If possible, can you please let me know what I would have to configure to allow this functionality? Thank you.

  • Great PDF-viewer: llpp Also, a question

    I just discovered llpp in the AUR. It's a great PDF-viewer that is extremely fast and remembers where I quit the file (next time you open that pdf, it opens at the page that you left last time) If I open files with SpaceFM everything works great. But