How can i close one of a tabpane in my programe like in JBuilder?

Use JTabbedPane?If not,any other way please!!! Thanks a lot!

Well, you have two options as I see it:
1) Put a small button in the tab with the icon of an 'x' in it...and use an event listener to know when the button is pressed.
or
2) Draw an 'x' in the fashion you want in the corner, then using a mouse listener, determine if the mouse cursor is pointing inside of the x's area then do whatever on the click of the mouse button.

Similar Messages

  • 2 websites are open simultaneously. How can I close one of the websites to have more space for the otheer websites

    Each time I use Firefox to open a news website A, another news website B appear on the left of A. How can I close A in order to have the full screen for B.

    Do a malware check with some malware scan programs. You need to scan with all programs because each program detects different malware. Make sure that you update each program to get the latest version of the database before doing a scan.
    * http://www.malwarebytes.org/mbam.php - Malwarebytes' Anti-Malware
    * http://www.superantispyware.com/ - SuperAntispyware
    * http://www.microsoft.com/windows/products/winfamily/defender/default.mspx - Windows Defender: Home Page
    * http://www.safer-networking.org/en/index.html - Spybot Search & Destroy
    * http://www.lavasoft.com/products/ad_aware_free.php - Ad-Aware Free
    See also "Spyware on Windows": http://kb.mozillazine.org/Popups_not_blocked and Searches are redirected to another site

  • How can I close one window without closing all open windows?

    If I open more than one window, I can't close just one. When I try to close just one, I'm warned that I'm about to close more than one (all of them) but I'm not told how to close just one.

    Are you sure you aren't getting tabs confused for windows? If you close a window containing multiple tabs, Firefox should give you a warning that you are about to close several tabs. To close a tab do one of the following:
    * click the x at the right end of the tab (when you only have a few tabs open)
    * open the tab you want to close, then click the x that appears
    * right click the tab and select 'Close Tab'
    * open the tab you want to close and press Ctrl+W
    You can close a window using Ctrl+Shift+W.

  • JSplitPane: how can I close one side of the jsplitpane?

    Hi!
    I have a jsplitpane component on my frame. I want to close one side of the jsplitpane when my program loads. And after some time I want to open it back..
    Do you happen to know how can I do that?

    Either you have not read the complete thread or you have not followed instructions correctly. Instead of adding HierarchyListener on JSpliPane, you are playing with divider before realization of split pane on screen.
    Here is modified code [This works 100%]:
    import java.awt.*;
    import java.awt.event.HierarchyEvent;
    import java.awt.event.HierarchyListener;
    import javax.swing.*;
    import javax.swing.plaf.basic.*;
    public class MySplit {
        private static void createAndShowGUI() {
            JFrame frame = new JFrame();
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            final JSplitPane splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT,
                    new JButton("first"),
                    new JButton("second"));
            splitPane.setOneTouchExpandable(true);
            splitPane.setDividerLocation(150);
            splitPane.setPreferredSize(new Dimension(400, 400));
            splitPane.addHierarchyListener(new HierarchyListener() {
                public void hierarchyChanged(HierarchyEvent e) {
                    if ((e.getChangeFlags() & HierarchyEvent.SHOWING_CHANGED) != 0) {
                        BasicSplitPaneUI ui = (BasicSplitPaneUI) splitPane.getUI();
                        BasicSplitPaneDivider divider = ui.getDivider();
                        JButton button = (JButton) divider.getComponent(1);
                        button.doClick();
            BasicSplitPaneUI ui = (BasicSplitPaneUI) splitPane.getUI();
            BasicSplitPaneDivider divider = ui.getDivider();
            JButton button = (JButton) divider.getComponent(1);
            button.doClick();*/
            frame.getContentPane().add(splitPane);
            frame.pack();
            frame.setVisible(true);
        public static void main(String[] args) {
            javax.swing.SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    createAndShowGUI();
    }Thanks,
    Mrityunjoy

  • HT204053 It seems as if I have 2 accounts.  I would like to combine one account with the other.  How can I close one apple ID and combine it with the other that I was not aware I had set up???

    I would like to close one account and only use the other.  D

    You can't close or delete accounts (you can only remove any personal info from them and stop using them), and you can't merge accounts or transfer purchases to another account - content will remain tied to the account that downloaded them.

  • Gryllida: How can I close one window while keeping a second window open?

    When I closed my primary window with all my tabs, the other window which came for the installing of an Adobe update closed as well. BOTH windows closed so I was unable to install the Adobe update. There must be a simple way to do this, but how. Thank you.
    == Operating system ==
    Windows XP

    This Adobe update window was most likely a pop-up from within one of the tabs that you closed, which means that as soon as the parent page is closed, the pop-up closes as well, which is by design. You can update Adobe Plug-in by following the corresponding link at the [https://www.mozilla.com/en-US/plugincheck/ Plugin Check] page.

  • I recently moved all my music and movie files to a portable hard drive to make room on my hard drive.  Now there are 128 gigs of back up when I look at the storage on my mac.  How can I clean out the backup without downloading a program like cleanmymac?

    please offer any ideas!  Thanks

    Mac OS X 10.7 Help: About local snapshots
    OS X Lion: About Time Machine's "local snapshots" on portable Macs
    Stefan

  • How can you close all pages in safari?

    On my iPad it is possible to close all windows in Safari.
    Is there a similar feature in Safari? Every time I clear the history, the last page remains open.
    How can I close that window as well without having to first create a new blank one?
    Regards

    Yes, ok, but then I still have to open a new page to continue browsing.
    on the iPad i can close all pages and safari for iOS defaults to favorites.
    regards

  • I can't close one window in Safari.

    I can't close one window in Safari. I'm on an iMac 27", OSX 10.9.4 and using Safari Version 7.0.5. I have several windows open - one with the header in grey (as they appear when not selected) and am able to individually close the other windows. The problem window has several tabs. I cannot close that window. If I try to select it, the top bar remains grey. I've quit and restarted, run disc utilities, run permissions and no problems show. At a loss how to handle this. I do not have this problem with Firefox.

    From the Safari menu bar, select
              Safari ▹ Preferences... ▹ Extensions
    Turn all extensions OFF and test. If the problem is resolved, turn extensions back ON and then disable them one or a few at a time until you find the culprit.

  • How can i close a modal window?

    Hi, everybody
    My question is in the subject, but i4ll repeat it again.
    How can i close a modal window in forms?. I4ve tried with hide_window but it doesnt closed itself.
    Please help me one again.
    Thanks.
    null

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by JAMIE MCPHIE ([email protected]):
    There is a bug with Oracle Forms where you can not use the close button "X" on the window title bar. You need to create a button on the window that will close the form.<HR></BLOCKQUOTE>
    Jamie
    You are right in the fact of the programmer must make a exit mechanism. However, this is not a bug, this feature is related to the management of this windows type (modal). Bye
    null

  • HT204053 How can I close or cancel an Apple ID?

    How can I close or cancel an Apple ID? I have multiple accounts and want only one. Can someone help with this?

    Mr Art5 wrote:
    That sounds like that could eventually wiegh heavy on the data bases. Having dead accounts just lying dorment. Does Apple clean them out from time to time? For instance an account that has been dorment for say 3 years, would they delte it eventually?
    Nobody knows the answer to that one - after all, iCloud has only been running for about a year and there aren't likely to be many abandoned accounts just yet.

  • I accidently doubled my Thunderbird window and I can't have just one Thunderbirs opened. How can I erase one? Thank you!

    When I open Thunderbird I actually open it twice. How can I erase one forever?

    After closing the second window, close TB via File (Alt-F) - Exit.

  • How can I close my adobe account?

    How can I close my adobe account?

    Which Adobe account? Reader doesnt' need one, but perhaps this may be helpful:
    http://helpx.adobe.com/x-productkb/policy-pricing/cancel-subscription-acrobat-online-servi ces.html

  • How can i use one SQL statement to solve problem?

    How can i use one SQL statement to solve the question below?
    For a Table named A, there is a column named F(char type).
    Now select all the records where F like '%00' and update their F value to '%01'
    Just one SQL statement.Do not use PL/SQL block.
    How to do that?
    Thanks.

    What is the data volume for this table?
    Do you expect lots of rows to have '%00' as their value?
    Following two statements come to mind. Other experts would be able to provide better alternatives:
    If you have index on SUBSTR(f, 2):
    UPDATE A
    SET    f = SUBSTR(f,
                      1,
                      length(f) - 2) || '01'
    WHERE  substr(f,
                  -2) = '00';If most of the rows have pattern '%00':
    UPDATE A
    SET    f = SUBSTR(f,
                      1,
                      length(f) - 2) ||
               DECODE(SUBSTR(f,
                             -2),
                      '00',
                      '01',
                      SUBSTR(f,
                             -2));

  • How can i use one iCloud Photostream on 2 devices?

    Due to a bug (or feature) on iOS 8 i can't use the same icloud id on 2 iphones:
    https://discussions.apple.com/thread/6536998
    So how can i use ONE iCloud Photostream then on 2 devices?
    Also, on OSX i can define only one Photostream.
    So, how do you import pictures from 2 streams into iPhoto?
    Familyshare is not usefull as the pictures are not in Original-Filesize!

    Hi ..
    Yes. " iPhone 6 or 6 Plus.  iPad Air 2  or  iPad mini 3"
    Set up and use Apple Pay

Maybe you are looking for

  • A PC buying guide for NLE (mainly Intel)

    For AMD setups, disregard the mentions of sockets and the like but the general recommendations still hold. When you need a new PC for editing purposes, you basically have three choices: 1. Buy an off the shelf system from companies like HP or Dell. 2

  • [SOLVED] After resume from suspend to RAM, system is slow / unstable

    Hello, I have come across some strangeness when trying to suspend my system.  The computer is a lenovo U350.  I have read a lot of threads on these subjects, but I never found one that quite matched the experiences I'm having, so I felt compelled to

  • Mac Mini- Starcraft 2

    I just bought the new mac mini, 2.4 GHz Inter Core 2 Duo, 2 GB 1067 MHz DDR3 and i ocassionally play Starcraft 2 which sadly delays very often. Is this due to low computer performance?

  • APP giving error "Internal order is in CRTD Active"

    Hi All, We are facing a strange issue. We have a PO for which a Down Payment request was raised. An internal order is assigned to PO which was in Created status. When we tried to pay the down payment using APP, the proposal ended up with error "Inter

  • Select from xmltype multiple rows not having XMLSequence in my db

    Hello every one i am new to use xml in pl/sql. we are using a db Oracle9i Enterprise Edition Release 9.0.1.4.0 but we do not have XMLSequence so that i can not use select like SELECT e.DOCUMENT.extract(value(d), '/xs:schema/xs:complexType/xs:complexC