Hide window problem

hi there!
i am learning java and have come across a problem i need help with.
i want a button called backButton to hide a JFrame called dateMenuFrame
here is a little bit of the script to explain whats going on... its the "dateMenuFrame.setVisible(false);" bit thats causing problems!
HELP!
public Component createDateMenu() {
JFrame dateMenuFrame = new JFrame("Browse by date");
Super appDate = new Super();
Component contentsDate = appDate.createDateMenuComponents();
dateMenuFrame.getContentPane().add(contentsDate, BorderLayout.CENTER);
// Finish setting up the frame
dateMenuFrame.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);
dateMenuFrame.setSize(1024,768);
dateMenuFrame.setVisible(true);
return dateMenuFrame;
// Adds components to dateMenu JFrame
public Component createDateMenuComponents() {
JLabel leftLabel = new JLabel("Please select a day below...");
leftLabel.setFont(font);
JLabel gapLabel = new JLabel(" ");
final JTextArea dateTArea= new JTextArea("Select a date on the left to display its information here.",20,1);
dateTArea.setLineWrap(true);
dateTArea.setWrapStyleWord(true);
dateTArea.setFont(font);
JButton backButton = new JButton("Back to main menu");
backButton.setFont(bFont);
backButton.setToolTipText("Click here to go back to the Main Menu");
backButton.setMnemonic('B');
backButton.setSize(20,20);
backButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
     dateMenuFrame.setVisible(false);
});

What is the error you are getting when you compile?
The first thing I notice is that try to instantiate an ActionListener ("new ActionListener()") but ActionListener is an interface, not a class, and thus cannot be instantiated.
You could let your main class implement ActionListener (and add an actionPerformed method to that class). Or, even better, you could do something like this:
JButton backButton = new JButton(new HideDateMenuFrameAction());
private class HideDateMenuFrameAction extends AbstractAction {
public HideDateMenuFrameAction() {  
super("Back to main menu");
public void actionPerformed(ActionEvent e) {
dateMenuFrame.setVisible(false);

Similar Messages

  • Computer will not boot up on usb cd rom to repair windows problem (corrupt file) what should i do

    computer will not boot up on usb cd rom to repair windows problem (corrupt file) what should i do

    Which computer? Which Windows?
    What are you trying to do?
    -Jerry

  • Error: BG: saplpd_open_dc failed, msg = 808 SAPLPD:Windows Problem

    Dear Friends,
    We are giving print from Citrix. BUt the print iis giving me following problem.
    Please suggest on the same.
    (6:14:29 PM) Number of processors: 2
    (6:14:29 PM) Icon DLL loaded.
    (6:14:29 PM)
    (6:14:29 PM) Network Communication via SAP-NiLib
    (6:14:29 PM) Hostname: THMUMGDCCTX02
    (6:14:29 PM) IP Address: 16348016.2673954.2011564330.1225156
    (6:14:29 PM)
    (6:14:29 PM) SAPLPD Version 6.29 for Windows/NT (OPT) is listening
    (6:14:29 PM) OS-Info: version = 5.2, build = 0/3790, text = Service Pack 2
    (6:14:29 PM) Copyright © 1992-2001 SAP AG
    (6:14:29 PM)
    (6:14:39 PM)
    (6:14:39 PM) Receive job for printer BKC_7thFlr_HPColor3800 on THMUMGDCPS01 (from BKCDT (Berkeley LPD protocol / RFC1179)
    (6:14:39 PM) send_status called
    (6:14:39 PM) send_status called
    (6:14:39 PM) send_status called
    (6:14:39 PM) send_status called
    (6:14:40 PM) send_status called
    (6:14:40 PM) Job 000001723200001.PRD for user ATINJ queued.
    (6:14:40 PM) Start printing job 000001723200001.PRD on printer BKC_7THFLR_HPCOLOR3800 ON THMUMGDCPS01 (FROM BKCDT
    (6:14:40 PM) Error: Cannot create Printer Context, text = Overlapped I/O operation is in progress.
    (6:14:40 PM) Error: The printer BKC_7THFLR_HPCOLOR3800 ON THMUMGDCPS01 (FROM BKCDT is unknown to Windows Print Manager.
    (6:14:40 PM) The following printers are currently defined:
    (6:14:40 PM) Printer = BKC_7THFLR_HPCOLOR3800 ON THMUMGDCPS01 (FROM BKCDT1017) IN SESSION 11
    (6:14:40 PM) Warning: Printer name contains spaces.
    (6:14:40 PM) Please rename printer, before using it from R/3 or UNIX!
    (6:14:40 PM) Printer = MICROSOFT XPS DOCUMENT WRITER (FROM BKCDT1017) IN SESSION 11
    (6:14:40 PM) Warning: Printer name contains spaces.
    (6:14:40 PM) Please rename printer, before using it from R/3 or UNIX!
    (6:14:40 PM) Printer = MICROSOFT OFFICE DOCUMENT IMAGE WRITER
    (6:14:40 PM) Warning: Printer name contains spaces.
    (6:14:40 PM) Please rename printer, before using it from R/3 or UNIX!
    (6:14:40 PM) Error: BG: saplpd_open_dc failed, msg = 808 SAPLPD:Windows Problem, siehe SAPLPD Protokoll
    regards
    Jiggi

    Hi,
    You are getting the error because the printer name is greater than 40 characters.
    The SAPLPD can only recognize printer names with 40 characters or less.
    From the log, i believe you are using the printer BKC_7THFLR_HPCOLOR3800 ON THMUMGDCPS01 (FROM BKCDT1017) IN SESSION 11
    but the SAPLPD is recognizing only till BKC_7thFlr_HPColor3800 on THMUMGDCPS01.
    Try to change the printer name .. it will work

  • [Flex 4.5.1] Focus on TextInput hides windows 7 language bar when in Chrome, Firefox works fine

    Focus on TextInput hides windows 7 language bar when in Chrome (latest version by the time of the writting) - very odd behavior, if the user clicks away from the flex app then the language bar reappears but even if you change the language if you focus back on the application the language is back to what it was the last time the application was focused, though you can't actually see this since the language bar is gone.
    This is kind of a serious bug since an avarage user probably would't be able to change the language with key combinations...
    Does someone know anything about this issue ?

    Actually giving focus on the entire flex application results in hiding the windows 7 language bar in chrome. I just reported this. Here is the link for the bug + an extra issue:
    http://bugs.adobe.com/jira/browse/SDK-32039

  • Error: BG: printfile failed, msg = 808 SAPLPD:Windows Problem, siehe SAPLPD Protokoll

    (12:58:18 PM) Number of processors: 4
    (12:58:18 PM) Icon DLL loaded.
    (12:58:18 PM)
    (12:58:18 PM) Network Communication via SAP-NiLib
    (12:58:18 PM) Hostname: WLRERW092
    (12:58:18 PM) IP Address: 33405096.2097184.8388736.1616984
    (12:58:18 PM)
    (12:58:18 PM) SAPLPD Version 6.28 for Windows/NT (OPT) is listening
    (12:58:18 PM) OS-Info: version = 6.1, build = 0/7601, text = Service Pack 1
    (12:58:18 PM) Copyright © 1992-2001 SAP AG
    (12:58:18 PM)
    (12:58:29 PM)
    (12:58:29 PM) Receive job for printer \\192.168.207.56\ULR_ZM400_HFW05 (Berkeley LPD protocol / RFC1179)
    (12:58:29 PM) send_status called
    (12:58:29 PM) send_status called
    (12:58:31 PM) send_status called
    (12:58:31 PM) send_status called
    (12:58:32 PM) send_status called
    (12:58:33 PM) Job 000NJJ3Z.WBP for user LR70343 queued.
    (12:58:33 PM) Job 000NJJ3Z.WBP (raw) started on printer \\192.168.207.56\ULR_ZM400_HFW05
    (12:58:46 PM) Error: The printer \\192.168.207.56\ULR_ZM400_HFW05 is unknown to Windows Print Manager.
    (12:58:46 PM) The following printers are currently defined:
    (12:58:46 PM) Printer = SEND TO ONENOTE 2010
    (12:58:46 PM) Warning: Printer name contains spaces.
    (12:58:46 PM) Please rename printer, before using it from R/3 or UNIX!
    (12:58:46 PM) Printer = PDF COMPLETE
    (12:58:46 PM) Warning: Printer name contains spaces.
    (12:58:46 PM) Please rename printer, before using it from R/3 or UNIX!
    (12:58:46 PM) Printer = MICROSOFT XPS DOCUMENT WRITER
    (12:58:46 PM) Warning: Printer name contains spaces.
    (12:58:46 PM) Please rename printer, before using it from R/3 or UNIX!
    (12:58:46 PM) Printer = HP EPRINT
    (12:58:46 PM) Warning: Printer name contains spaces.
    (12:58:46 PM) Please rename printer, before using it from R/3 or UNIX!
    (12:58:46 PM) Printer = FAX
    (12:58:46 PM) Printer = ADOBE PDF
    (12:58:46 PM) Warning: Printer name contains spaces.
    (12:58:46 PM) Please rename printer, before using it from R/3 or UNIX!
    (12:58:46 PM) Printer = \\192.168.207.21\SHARP MX-4111N PCL6
    (12:58:46 PM) Warning: Printer name contains spaces.
    (12:58:47 PM) Please rename printer, before using it from R/3 or UNIX!
    (12:58:47 PM) Printer = \\192.168.208.21\SHARP MX-4111N WELSPUN 2
    (12:58:47 PM) Warning: Printer name contains spaces.
    (12:58:47 PM) Please rename printer, before using it from R/3 or UNIX!
    (12:58:47 PM) Printer = \\192.168.207.21\ULR_ZM400_HFW05
    (12:58:47 PM) Printer = \\192.168.207.21\ULR_ZM400_HFW06
    (12:58:47 PM) Cannot do OpenPrinter \\192.168.207.56\ULR_ZM400_HFW05. Text = The operation completed successfully.(12:58:47 PM) Error: BG: printfile failed, msg = 808 SAPLPD:Windows Problem, siehe SAPLPD Protokoll
    please help
    Regards
    selvakumar

    Apparently our Sandbox system didn't have a Spool server configured. That's why the error. It works perfectly in other systems.
    The output device's Host Printer must be defined on the spool server for saplpd to recognize. Otherwise you see an error.

  • How to hide Windows and Oracle Logo?

    I'd like to hide Windows and Oracle Logo in Oracle window
    https://sites.google.com/site/myoracleproblems/home/screen
    or move application higher. Does someone know what to do, if anything?
    thanks
    m.

    Abdetu wrote:
    Thanks JeanYves
    i found that parameter but didn't know what to set to it i even has no forms in my pc thanks again
    Regards,
    Abdetu...Hi Abdetu,
    There is 3 parameters in the <DevSuiteHome>\forms\server.formsweb.cfg having the same behavior.
    Logo
    Background
    SplashScreen
    By default (if you don't have specified them in you [section] they values are inherited from the [default] section) the values are
    Logo=
    Background=
    SplashScreen=
    This means you will have the oracle logo, the Forms Services background image in your applet and the oracle splash screen at startup.
    *To have nothing shown then just put the value no in front of these 3 parameters*
    Logo=no
    Background=no
    SplashScreen=noYou can also customize that with you own gif files.
    For this you have to put your images in a icons.jar file
    place it in your <DevSuiteHome>\forms\java where frmall.jar and others are located.
    then in your formsweb.cfg :
    Archive=frmall.jar, icons.jar
    ImageBase=CodeBase
    Logo=yourlogo.gif
    Background=yourbackground.gif
    SplashScreen=yourbeautifullsplachscreen.gifAnd at least if you have a small gif in your icons.jar for the window you can also defining the Icon Filename property in Forms builder. This wile replace the default forms runtime icon.
    Hope this helps
    JeanYves

  • How to hide windows heading and border on WEB?

    How to hide windows heading and border on WEB? forms 6i.
    null

    Abdetu wrote:
    Thanks JeanYves
    i found that parameter but didn't know what to set to it i even has no forms in my pc thanks again
    Regards,
    Abdetu...Hi Abdetu,
    There is 3 parameters in the <DevSuiteHome>\forms\server.formsweb.cfg having the same behavior.
    Logo
    Background
    SplashScreen
    By default (if you don't have specified them in you [section] they values are inherited from the [default] section) the values are
    Logo=
    Background=
    SplashScreen=
    This means you will have the oracle logo, the Forms Services background image in your applet and the oracle splash screen at startup.
    *To have nothing shown then just put the value no in front of these 3 parameters*
    Logo=no
    Background=no
    SplashScreen=noYou can also customize that with you own gif files.
    For this you have to put your images in a icons.jar file
    place it in your <DevSuiteHome>\forms\java where frmall.jar and others are located.
    then in your formsweb.cfg :
    Archive=frmall.jar, icons.jar
    ImageBase=CodeBase
    Logo=yourlogo.gif
    Background=yourbackground.gif
    SplashScreen=yourbeautifullsplachscreen.gifAnd at least if you have a small gif in your icons.jar for the window you can also defining the Icon Filename property in Forms builder. This wile replace the default forms runtime icon.
    Hope this helps
    JeanYves

  • Nested Window Problem

    Hopefully someone out there can help solve this one.
    How do you get a child window to automatically resize within a parent
    window?
    On their own both the child window and the parent window behave as
    expected but once we attempt to load the child window into the parent
    window the child window is sized to some unknown but excessively large
    size.
    Can this be solved with some creative use of parent size relationships
    or do we have to programmatically size the child window?
    Any help/comments/suggestions would be greatly appreciated.
    Sincerely,
    Sean G. Germain

    Glen,
    Thank you for the prompt reply.
    We have already done what you suggested (My explanation was not very
    clear ... sorry) to no avail.
    Any more takers and/or ideas anyone?
    Thanks,
    Sean
    -----Original Message-----
    From: Glen A. Whitbeck [SMTP:[email protected]]
    Sent: Monday, January 26, 1998 2:47 PM
    To: GERMAIN Sean
    Cc: 'Forte Users Group'
    Subject: Re: Nested Window Problem
    You may need to dynamically tell the child window what its parent is (such
    as a named grid that exists on the parent window). Setting the child
    window to size to its parent should work once the child window knows who
    its parent is. You should be able to put your window into that grid at
    specified row and column coordinates. To reset the parent and position a
    widget in a grid, you do something like the following:
    <Widget>.Parent = NIL;
    <Widget>.Row = 1;
    <Widget>.Column = 1;
    <Widget>.Parent = <TargetGrid>;
    I believe that you should be able to do the same thing for a window, too
    (using "Self.Window" instead of "<Widget>").
    Glen
    GERMAIN Sean wrote:
    Hopefully someone out there can help solve this one.
    How do you get a child window to automatically resize within a parent
    window?
    On their own both the child window and the parent window behave as
    expected but once we attempt to load the child window into the parent
    window the child window is sized to some unknown but excessively large
    size.
    Can this be solved with some creative use of parent size relationships
    or do we have to programmatically size the child window?
    Any help/comments/suggestions would be greatly appreciated.
    Sincerely,
    Sean G. Germain<< File: vcard.vcf >>

  • Running Worldcraft with Wine (or OpenGL in child window problem)

    Hi!, I'm trying to run Worldcraft (the Half life map editing tool) with wine (version 0.9.30), everything works fine except when I choose to display a 3D view on one of the viewports  (3D views uses OpenGL to render the scene), when I do this, the whole window turns black, and flickers (showing some portion of the original window) when I hit the mouse button of move the window.
    This seems to be the Opengl in child window problem that was supposedly fixed in wine 0.9.28, but, well.. it happens    This happens also with Lightwave 8.0.
    Can anyone try and see if this happens to you as well?  or.. well. does anybody knows how to fix it?
    thanks a lot!
    silencer

    Thanks Nephastos, but I'm trying to run Worldcraft, not Warcraft Worldcraft is a world editing tool for Half-Life.
    I uploaded it to my server if anyone would like to try and see if it works for you (as it is an issue that should be solved by now, I think),  you can download it from http://www.darkdesigns.com.ar/worldcraft3.exe
    Thanks a lot
    silencer

  • Failure to search - query window problem

    Hello again,
    Have anyone of you came across a problem with SAP search mechanism in query window attached to document field? I've created a simple query of "Select acctcode,acctname from OACT where acctcode like '2%' and postable='Y' order by acctcode" and attached it to one of document fields (doesn't matter which one). When I run this query a usual window poped up with a search field on the top, but when I typed "2" in it, selection bar moved right into first 231 account ignoring any of the lesser numbers. There is more - when I changed query to search for '5%' like accounts, I gained the same result - accounts less than 530 were ignored even if I typed "50" or "51". BUT - when I changed query sort order to "desc", all account became "findable".
    I got this problem in one database only which is SAP 8.8 PL10 version upgraded recently from 2007A one. I've checked with a newly created 8.8 and such problem hasn't occured.

    Hello Thomasz,
    I might be off base here, what happens when you use this??? 
    Do you get the same types of query window problem???
    Select
    acctcode,
    acctname,
    segment_0
    from OACT
    where Segment_0 like '2%'
    order by acctcode
    for browse
    Regards,
    Zal

  • [iPhoto] Assertion failure/Modal window problem

    I've been trying to order prints through iPhoto (6.0.6) but when I hit the "Order prints" button nothing happens. I get the following error in the Console log. It seems as though iPhoto is trying to spawn a new window (which makes sense) and can't.
    I've reinstalled iPhoto, rebooted, etc. but keep getting same problem.
    2007-10-08 22:07:27.616 iPhoto[589] * Assertion failure in -[ExtendedApplication _commonBeginModalSessionForWindow:relativeToWindow:modalDelegate:didEndSelector :contextInfo:], AppKit.subproj/NSApplication.m:3057
    2007-10-08 22:07:27.617 iPhoto[589] Modal session requires modal window

    I found this discussion. I could not access the discussion link. Under the instructions, I didn't understand what "rm files and directories" means ... perhaps "remove"????
    Help
    "After a ran steps to fix the problem of Safari giving "localized string not found" messages, the "modal session requires modal window" problem went away.
    Here is a link to the post.
    http://discussions.info.apple.com/[email protected]
    The instructions are to:
    1. Download lastest version of Safari
    2. rm files and directories in /System/Library/Frameworks/WebKit.frameworks
    3. Install Safari again
    4. Run permissions repair in Disk Utility"

  • Hide window in access

    Hello, ALL
    I use the following code to hide database window :
    Private Declare Function IsWindowVisible Lib "user32" (ByVal hwnd As Long) As Long
    Dim dwReturn As Long
    Const SW_HIDE = 0
    Const SW_SHOWNORMAL = 1
    Const SW_SHOWMINIMIZED = 2
    Const SW_SHOWMAXIMIZED = 3
    Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, _
    ByVal nCmdShow As Long) As Long
    Public Function fAccessWindow(Optional Procedure As String, Optional SwitchStatus As Boolean, Optional StatusCheck As Boolean) As Boolean
    If Procedure = "Hide" Then
    dwReturn = ShowWindow(Application.hWndAccessApp, SW_HIDE)
    End If
    If Procedure = "Show" Then
    dwReturn = ShowWindow(Application.hWndAccessApp, SW_SHOWMAXIMIZED)
    End If
    If Procedure = "Minimize" Then
    dwReturn = ShowWindow(Application.hWndAccessApp, SW_SHOWMINIMIZED)
    End If
    If SwitchStatus = True Then
    If IsWindowVisible(hWndAccessApp) = 1 Then
    dwReturn = ShowWindow(Application.hWndAccessApp, SW_HIDE)
    Else
    dwReturn = ShowWindow(Application.hWndAccessApp, SW_SHOWMAXIMIZED)
    End If
    End If
    If StatusCheck = True Then
    If IsWindowVisible(hWndAccessApp) = 0 Then
    fAccessWindow = False
    End If
    If IsWindowVisible(hWndAccessApp) = 1 Then
    fAccessWindow = True
    End If
    End If
    End Function
    But ,
    When i click on the icon access application in taskbar, the ms access DB window re-appears!.  Is it
    a solution?
    thanks

    You can use the hide window option of the show window fuction in the
    user32.dll for windows. Docs and help at vbapi.com.
    http://vbapi.com/ref/s/showwindow.html to be exact.
    You may also need to hide the additional taskbar entry that labview adds by
    default.
    Do this by adding HideRootWindow=True to your labview or exe ini file.
    Mike
    ----- Original Message -----
    From: "Tifa"
    Newsgroups: comp.lang.labview
    Sent: Monday, June 25, 2001 3:45 AM
    Subject: Hiding taskbar icon.
    > When I launch MS Access using ActiveX in Labview, I can hide the
    > window of Access using Property node with property visible = false.
    > However, this doesn't hide the Access icon in the Windows taskbar. How
    > can I hide it? My goal is to make the communication with Access
    > invisible to th
    e user of my programme.

  • Hide window without delete

    how to hide window without delete in script or smart form if it is already exist

    Hi,
    <b>[1].</b> If print program is custom build, do not call this window.
    <b>[2].</b> If print probram is not custom built then put the window code in between IF.... ENDIF. You have to do like this.
    - First define a variable with  
    /:  DEFINE &true& = ' '.
    - Now put your all other code between this condition.
          /: IF &true& EQ '1'.
             your code
          /: ENDIF.
    <b>[3].</b> Or as the third option, commend your code. But in this case you will loose your formatting since you have to put  comment ( /* ) code at each line.
    Let me know if you need any other information.
    Regards,
    RS

  • My playlist has dissapeared itune issue or windows problem?

    My playlist has dissapeared from libraray itunes issue or windows problem?

    Hi,
    It's pointless to use that ammount of ram under Win9x/Me as it will be slower then if you use only 256MB witch is the optimal ammount for these OS'ses.
    So you better take 256 out or move to Win2000/XP....

  • Safari launches but hides window

    Okay, I just came home a week or so ago to find out that my mother can't use safari on her computer. Meanwhile, I have no problem using it on mine, a laptop running windows vista.
    My mother had gotten a new computer, HP 2009m, as it says on the monitor. She's tried removing Safari and redownloading it and that doesn't work.
    It'll open Safari up, but it flies off to the right of the monitor and hides from view, even though you can preview it in the menu bar at the bottom of the screen. she isn't having this problem with any other browsers.

    No problem.
    If it's a new PC, I'm assuming she won't have any Bookmarks or Top Sites to speak of (especially if the browser has been grumpy from an early stage of proceedings). So I'd be inclined to go for the "so much for subtlety" approach and clear out all of the Safari settings and preferences files for her usual user account on the PC.
    On Windows 7, I'd use the following procedure.
    (1) Quit Safari if you have it open
    (2) Go *Start > Open.*
    (3) In the Organize menu, click *Folder and Search Options.*
    (4) Click the View tab.
    (5) Make sure that *Show hidden files and folders* is selected.
    (6) Click OK.
    (7) Go *Start > Computer.*
    (8) In Computer open *Local Disk C:*
    (9) Open the Users folder.
    (10) Open the folder with the name of the Windows 7 user account in which Safari isn't displaying properly.
    (11) Open the AppData folder.
    (12) Open the Roaming folder.
    (13) Open the *Apple Computer* folder.
    (14) Rename the Safari folder "Safari1" and drag it out onto the Desktop.
    (15) Open the Preferences folder.
    (16) Drag the com.apple.Safari plist file out onto the Desktop.
    (17) Go back into the AppData folder.
    (18) Open the Local folder.
    (19) Open the *Apple Computer* folder.
    (20) Rename the Safari folder "Safari2" and drag it out onto the Desktop.
    Now launch Safari again. This should rebuild those preference files/folders. (The welcome to Safari thingy will probably play again .)
    Does Safari display normally this time?

Maybe you are looking for

  • How to get each node in tree?

    how to get each node in tree? Message was edited by: NikisinProblem

  • File Adapter - Sender Problem

    Hi, While implementing a file to file interface I am facing problem in Integration Engine. Data is not passing to Integration engine, so it is not able to reach receiver. Receiver file adapter is working fine for other scenarion like IDoc to File. Fi

  • Software Duplicate in Report

    Hi everbody I have a doubt with software report. When a run a report for specific computer, visual studio appear twice like visual studio 2013 professional and visual studio premium 2013. But looking in add\remove programs that is only visual studio

  • Creative Zen Mirco 8gb fro

    Hi My creative zen froze about a month or two ago .. and i've been trying to get it to work... when the battery dies i plug it into the computer.. it charges but the computer doesnt detect the player so theres no way i can update firmware or anything

  • Wrong artwork showing on my iPod

    After upgrading to the most recent versions of iTunes and iPod, my iPod hasn't been showing the correct artwork when it plays some songs. Sometimes, it's the right artwork, and sometimes, it isn't. What's the problem? Does anyone know?