Possible to receive event on disabled frame?

I have an application that have many JFrame popups. After 15 minutes, the app will automatically lock all windows calling their setEnabled(false). A Lock window is displayed let user to relogin.
When user click on any of open frame, I would like to display Locked frame by user's cursor. However, the inactive windows are not receiving any mouse event.
Anyone have good idea on how to intercept mouse event on disabled JFrame?
Thanks.

817011 wrote:
I have an application that have many JFrame popups. .. That is where you start to go wrong. Have just one <tt>JFrame</tt> & show other information as <tt>JDialogs</tt> or alternately include it in the main <tt>JFrame</tt> using a <tt>CardLayout</tt>, <tt>JTabbedPane</tt>, <tt>JDektopPane/JInternalFrame</tt> or similar.
..After 15 minutes, the app will automatically lock all windows calling their setEnabled(false). A Lock window is displayed let user to relogin.Put the login GUI into a modal <tt>JDialog</tt> and provide the <tt>JFrame</tt> as the parent.
The user will not be able to access the <tt>JFrame</tt> until the <tt>JDialog</tt> is dismissed.

Similar Messages

  • Added Jcombobox into awt.frame causing handling event function cannot receive event

    Dear Sir,
    I want to ask how an awt.Choice  can set the number of rows that it can display, like the method setMaximumRowCount in JCombobox. Since I want to set more row can be displayed, but choice no any method can set. And I have tried to add Jcombobox into awt.frame, then, the handling event function cannot receive event for the right-top cornet button(minimize, maximum, close).
    Best Regards,

    please post a Short, Self Contained, Correct Example showing your problem.
    bye
    TPD

  • Mouse Events on Disabled Buttons

    Hi,
    In my application I should make a disabled button to show a tool tip when mouse is entered onto it.
    I'm using java.awt.container not Jcontainer.
    I have searched in SDN forums and after reading some of the comments what I understood is �disabled Swing button can react to Mouse events but a disabled awt button can not react to mouse events�.
    Is that true or did I not understand correctly?
    And how would I be able to implement the required functionality in my
    application?
    Thanks.

    import java.awt.*;
    import java.awt.event.*;
    public class AwtTooltip {
        private Panel getContent(Frame f) {
            Button left = new Button("left");
            left.setEnabled(false);
            Button right = new Button("right");
            Panel panel = new Panel(new GridBagLayout());
            new TipManager(panel, f);
            GridBagConstraints gbc = new GridBagConstraints();
            gbc.weightx = 1.0;
            panel.add(left, gbc);
            panel.add(right, gbc);
            return panel;
        public static void main(String[] args) {
            AwtTooltip test = new AwtTooltip();
            Frame f = new Frame();
            f.addWindowListener(closer);
            f.add(test.getContent(f));
            f.setSize(300,100);
            f.setLocation(200,200);
            f.setVisible(true);
        private static WindowListener closer = new WindowAdapter() {
            public void windowClosing(WindowEvent e) {
                System.exit(0);
    class TipManager extends MouseMotionAdapter {
        Panel component;
        Window tooltip;
        Label label;
        public TipManager(Panel panel, Frame frame) {
            component = panel;
            panel.addMouseMotionListener(this);
            initTooltip(frame);
         * Since enabled Buttons consume MouseEvents we will
         * receive events sent only from disabled Buttons.
        public void mouseMoved(MouseEvent e) {
            Point p = e.getPoint();
            boolean hovering = false;
            Component[] c = component.getComponents();
            for(int j = 0; j < c.length; j++) {
                Rectangle r = c[j].getBounds();
                if(r.contains(p)) {
                    hovering = true;
                    if(!tooltip.isShowing())
                        showTooltip(c[j], p);
                    break;
            if(!hovering && tooltip.isShowing()) {
                tooltip.setVisible(false);
        private void showTooltip(Component c, Point p) {
            String text = ((Button)c).getLabel();
            label.setText(text);
            tooltip.pack();
            convertPointToScreen(p, component);
            tooltip.setLocation(p.x+10, p.y-15);
            tooltip.setVisible(true);
        /** Copied from SwingUtilities source code. */
        public void convertPointToScreen(Point p, Component c) {
            Rectangle b;
            int x,y;
            do {
                if(c instanceof Window) {
                    try {
                        Point pp = c.getLocationOnScreen();
                        x = pp.x;
                        y = pp.y;
                    } catch (IllegalComponentStateException icse) {
                        x = c.getX();
                        y = c.getY();
                } else {
                    x = c.getX();
                    y = c.getY();
                p.x += x;
                p.y += y;
                if(c instanceof Window)
                    break;
                c = c.getParent();
            } while(c != null);
        private void initTooltip(Frame owner) {
            label = new Label();
            label.setBackground(new Color(184,207,229));
            tooltip = new Window(owner);
            tooltip.add(label);
    }

  • Receiving Events from all nodes

    Hi
    I have a cluster which contains n nodes.Each node contains a partitioned
    cache service with a cache called CacheA. If an object is inserted it is inserted to any one
    of the n nodes based upon some distribution algorithm and registered event listeners for that
    particular cache are triggered on that node.
    But is there a way to trigger an event in all n nodes irrespective of the physical location of insertion?
    If so, how to go about it? Any documents or help regarding this will be helpful to me.
    Thanks ,
    Ramyaa.

    Hi Mark,
    AFAIK the guarantees for listeners are the following:
    Listeners registered inside the TCMP cluster (full-fledged cluster nodes, not in an *Extend client):
    - sychronous listeners (listeners implementing MapListenerSupport.SynchronousListener or those wrapped in MapListenerSupport.WrapperSynchronousListener) guaranteed to get notifications before the thread executing the triggering cache operation (if there was one) returns from the cache operation. I am not 100% sure, but I strongly believe that the cache operation returning also means that the synchronous listeners also completed, judging from the documentation of SynchronousListener, which would also mean that an ack for synchronous listeners is only sent back from the listener node once all synchronous listeners completed.
    - asynchronous listeners are guaranteed to be notified but this notification will not be guaranteed to happen before the triggering cache operation completed
    The only exception to that is if the listener node drops out of the cluster according to the owner of the entry which changed, or if the service for some reason dies on the listener node; about both you will get a notification so that you know that you are no more receiving events.
    In both cases (sync/async) the entry owner notifies the node the listener is registered on, and I believe it will retry sending the event until it is ack-ed to be received. I don't know whether the ACK comes from the TCMP layer or from the particular service in the async case, I would guess the service.
    The listener node will do duplicate detection on the delivered events per listener so that it will find out if it already invoked the listener once with the same event.
    No transactions are provided for listeners, so even if an exception happens in a synchronous listener, it won't roll back the entry change.
    For *Extend clients, I believe there are no guarantees for delivering events arriving while the client failed over after a broken connection.
    For the staying connected case, and I don't know what the situation is, but I would expect synchronous listeners are not supported over *Extend, and async exactly one notification seems possible (again, while the client is connected), but I am not sure about this.
    Best regards,
    Robert

  • Once completed the form, is it possible to receive the confirmation e-mail with a link addressing to a html archive?

    Once completed the form, is it possible to receive the confirmation e-mail with a link addressing to a html archive?

    I don't know if it is the best solution but you could filter the results to just that client's answers on the summary tab and then PDF that.

  • Is it possible to enter events into a specific iCal calendar, then print a list of those events with the name and date on a single sheet?

    Is it possible to enter events into a specific iCal calendar, then print a list of those events with the name and date on a single sheet?  I don't need the calendar grid.  I just want a list of events on a particular calendar, and their dates.  Is that possible? 

    Not easily. Two possibilities:
    1) If all the events have some common feature (eg you have included "XXX" in all the summaries), search for that feature then select and copy the found items at the bottom of the window. You can then paste them into TextEdit or a spreadsheet for printing
    2) You could write an Applescript to locate the events and write them into a text file for printing.
    The first one will probably give you what you want.

  • Even if we have bought the advance version of Adobe FormsCentral, is it possible to receive via e-mail the completed form in .pdf? If not, is it possible to develop this option? How much would it cost?

    Even if we have bought the advance version of Adobe FormsCentral, is it possible to receive via e-mail the completed form in .pdf? If not, is it possible to develop this option? How much would it cost?

    I know of no way to do this with Reader or XML.

  • I purchased an iPhone 4s in Paris a month ago and I lost the receipt Is it possible to receive a receipt by e-mail in my name?

    I purchased an iPhone 4s in Paris a month ago and I lost the receipt Is it possible to receive a receipt by e-mail in my name?

    You purchased a "hacked" iPhone(hacked to unlock it) from a non-official source for iPhones. Unfortunately, that's the risk you take when you purchase from a non-official source. There is no way to get your phone officially unlocked, & all warranty & support has been voided. Sorry, but you don't have any good choices here. Your best bet is to go back to Carrefour Supermarket & get your money back, then purchase an iPhone from an official source. If they won't give you your money back, have them "fix" your phone...they will have to "hack" it again. Good luck.

  • Every morning receive Event Source MSExchange Common ID 4999

    Every morning at 2/2/2012 2:06:02 AM
     for weeks now we receive Event Source MSExchange Common ID
    SBS 2011 
    Standard – Exchange 2010 => build 14.01.0355.002 (Update Rollup 6 for Exchange Server 2010 SP1)
    Event Details:   
     Watson report about to be sent for process id: 12000, with parameters: E12, c-buddy-RTL-AMD64, 14.01.0355.001, BPA, M.E.Data.Directory, M.E.D.D.DSAccessTopologyProvider..ctor, S.IO.FileLoadException, 72f, 14.01.0355.001. ErrorReportingEnabled:
    False
    This is an Intel machine so we are not sure why there is “AMD64” in the details - This Event does not seem to cause any problem that we can detect.
    Anyone tried 
    - Exchange Server 2010 SP2 December 4, 2011 Build 14.2.247.6 on a SBS2011 Standard yet? -
     Since one of the KB articles – I found says -
     Maybe -
    http://support.microsoft.com/kb/2447629 (Rollup 3 but we have 6)

    Hi,
    It seems that the issue is related to the special characters in the database name cause an
    IndexOutOfRangeException exception. This exception crashes the
    MSExchangeServicesAppPool application pool.
    For more detailed information, you could refer to the article below:
    Title: Event ID 4999 is logged on an Exchange Server 2010 Client Access server (CAS)
    URL:
    http://support.microsoft.com/kb/2665115
    From the KB article resolution, you need to obtain Interim Update (IU) by contacting Microsoft Customer Service and Support.
    Regards,
    James
    James Xiong
    TechNet Community Support

  • Receiving events from event hub was blocked.

    In our Cloud Service project, we have 2 instances for work role (deploy to Azure), the work role is consume events from the EventHub using EventProcessorHost(host name is RoleInstance name).
    For sending events:
        var
    client = EventHubClient.CreateFromConnectionString(serviceBusConnectionString,
    hubName);
    while (true)
    var eventData =
    new
    EventData(Encoding.UTF8.GetBytes("test"))
    {PartitionKey = "key"};
                        eventData.Properties.Add("time",
    DateTime.UtcNow);
                    client.SendAsync(eventData).Wait();
                    Thread.Sleep(50);
    Each 50ms, we send one event (event1, 2,3 …….);
    For receiving data:    
     public
    async
    Task ProcessEventsAsync(PartitionContext
    context, IEnumerable<EventData>
    events)
                //when
    we get the event, so we can view the log
    Trace.WriteLine(“got events”);
    foreach (var
    eventData in events)
                    // handle the event
    Task.Delay(12000).Wait();
    await ContextCheckpointAsync(context);
    We add the
    delay for event operation.
    It seems that we cannot receive data in time from the log, seems event6 was blocked for the Event5 delay, after the 12ms, we can receive event6 from the EventHub, and the Event6
    delay is 40s(from the log, we send event6 to Hub at 35:10, but we get from Hub at 35:50),
    So I wonder to know the maximum number of threads are working on processing fot the EventProcessorHost? Depends on the Partitions?
    And is there any way to receiving events in time?

    Hi Jordan
    Since Task.Delay call blocks the callback, host won't hand over new events until you're done with the current batch. This is due to order guarantee of the events delivered, i.e. host should process the events in order from the same partition.
    If event process is taking so long then you should consider to move process job into a separate thread so host can deliver new batch of events while thread is working on the previous batch.

  • Is is possible to open event lists from different tracks at the same time in Logic Pro 9?

    Is it possible to open event lists from two difference tracks in an arrangement at the same time in Logic Pro 9?
    When I switch between tracks the event list swiches as well. Thanks in advance.

    If you deselect the litte chain link icon in the event list window, it will no longer follow your region selection and you can openas many as you need. Also you can select multiple regions and see the inthe SAME window if you select to show multiple regions, and you can have the notes shown in their respective track colors.

  • We stopped receiving event about lockout users after we installed rollup 4 for tmg with sp2

    We have implemented Account Lockout Feature in TMG 2010 (http://www.ntsystems.it/post/ActiveSync-ForeFront-TMG-and-AccountLockoutThreshold.aspx). We configured
    alert definition to send alert when problem occure. After we installed rollup 4 we stopped receiving  event about this probloem ("The limit of consecutive logon failures has been reached...."). How can we resolve this problem? We have implented
    a script which send this information automatically to user with problem. This is very important for us.
    Event description:
    Source: Microsoft Forefront TMG Web 
    Event ID: 32581
    Level: Error
    Text: limit for consecutive logon failures has been reached. Additional logon attempts by domain.local\user.name will be automatically rejected for the next 300 seconds

    Hi,
    Before going further troubleshooting, we should confirm if account lockout works fine now.
    Please refer to the article below to check some limitations on this function.
    http://blogs.technet.com/b/isablog/archive/2012/11/01/using-the-account-lockout-feature-in-tmg-2010.aspx
    Is there any other different information after you install Rollup 4? Or what something else do you change during update to RU4?
    Best Regards
    Quan Gu 

  • Is it possible to receive a String[] back into stored procedure?

    Hi,
    Is it possible to return String [] into plsql procedure?
    I have a class :
    class CreditCard {
    public static String cc (String args []) []
    throws
    SQLException, ClassNotFoundException
    I load it into the database and then create a plsql procedure:
    CREATE OR REPLACE PROCEDURE check_credit(
    card_number IN          VARCHAR2,
    exp_month IN          VARCHAR2,
    exp_year      IN          VARCHAR2,
    flag1      OUT varchar2,
    flag2          OUT varchar2)
    AS LANGUAGE JAVA
    NAME 'CreditCard.cc(java.lang.String[]) return java.lang.String[]';
    trying to compile it gives me:
    20/1 PLS-00311: the declaration of "CreditCard.cc(java.lang.String[])
    return java.lang.String[]" is incomplete or malformed
    Is it possible to receive a String[] back into stored procedure?
    Thanks
    Leonid

    I don't think you can use a String Array directly, you have to use an oracle.sql.ARRAY.
    You use the oracle.sql.ARRAY parameter in Java as an OUT parameter in the stored procedure. You need to use an ArrayDescriptor which requires a corresponding Oracle Nested Table type.
    Try something like the following:
    First the Nested Table Type:
         CREATE OR REPLACE TYPE
         TBL_STRINGS AS TABLE OF VARCHAR2(999);
    Then the Java method:
    public static void getStrings(oracle.sql.ARRAY[] theStrings) //has to be an array of oracle.sql.ARRAY's as we use it as an OUT parameter
    try
         //get a connection
         Connection conn = DriverManager.getConnection("jdbc:default:connection:");
         String [] colours = new String []{"RED", "GREEN", "GOLD"};
    ArrayDescriptor desc = ArrayDescriptor.createDescriptor("TBL_STRINGS", conn);
    theStrings[0] = new oracle.sql.ARRAY(desc, conn, colours);
         conn.close();
    catch (SQLException sqle)
              //report error
    Then the call spec:
         PROCEDURE GET_STRINGS(p_the_strings     OUT     TBL_STRINGS)
         AS LANGUAGE JAVA
         NAME 'mypackage.MyClass.getStrings(oracle.sql.ARRAY[])';

  • Is it possible to remove blemishes from video frames with photoshop cc?

    Is it possible to remove blemishes from video frames with photoshop cc?

    Again, show us reference screenshots and we will advise. Otherwise this could become an endless theoretical discussion. Depending on what you want to do you can import the video directly using Layer --> New Video Layer e.g. when covering up fied spots with a brush blob on a layer on top of the footage, but you may also need to create separate layers for each frame using the Frames to Layers script so you can paint on each of them individually. There's really too much we don't know and the possibilities are potentially infinite...
    Mylenium

  • Waiting for receiving whole data in data receive event of serila port

    0down votefavorite
    I want to migrate one VB6 project to C#. In VB6 project MSCOMM control is used for serial port communication. Instead of using same control in C# application I have used serial port class.
    Initially I am sending 4 consecutive commands to serial port. When I tried to debug the code I found
    DataReceive event is working in separate thread.
    I need 15 bytes response for first command 17 bytes response to second command.
    But as we know DataReceive event for one byte also.
    I want to get whole 15 bytes response for first command and then want to send second command.
    I have tried following code.
    private void serialPort1_DataReceived(object sender, System.IO.Ports.SerialDataReceivedEventArgs e)
    if (serialPort1.ReceivedBytesThreshold > sent_command.Length)
    string data = serialPort1.ReadExisting();
    int bufferLengh = data.Length;
    string output_str;
    char[] array = data.ToCharArray();
    string final = "";
    foreach (var i in array)
    string hex = String.Format("{0:X}", Convert.ToInt32(i));
    final += hex.Insert(0, "") ;
    final = final.TrimEnd();
    output_str = final;
    MessageBox.Show(output_str);
    Using above code I am getting data filled with one or two bytes and rest data bytes as "0" but data byte length is correct. (for first command it is 15 and second command 17 bytes)
    Or sometimes data = ""
    My question is how to wait in data receive event to get whole response and then it will receive the response for second command.
    In VB6 application one polling timer is used.
    If I used a timer in C# application then in that timer event timeout exception get fired and data receive event does not get fired.
    Please help me to resolve this.
    Thanks in advance.

    Perhaps the solution discussed in this thread will help:
    https://social.msdn.microsoft.com/Forums/vstudio/en-US/f263cd57-9e88-41dd-bc38-ddaf1bd963c0/how-to-wait-for-a-serialport-receive-data?forum=netfxcompact

Maybe you are looking for

  • Source code for window explorer in JTree

    I am a JAVA learner and want to display the drives as the root node in the tree structure. i am not able to add window explorer in the tree structure as root. . i want sample program for doing as follows. I want a tree structure something like: - My

  • Cred.lim.used  field in FD32 not getting updated

    hi All, I have a scenario where my Cred.lim.used field which is a %age value is not getting updated in fd32 when I go to fd33 for a customer my Credit limit is 1,000,000.00 and Credit exposure is 1,138.28- but the %age is 0.00 %. any suggestions than

  • Master and work rep in same schema

    Hi What happens when master and work repository are in the same schema. I did all my development only to realize master and work are in the same schema.. Its working in now.. What happens when I migrate to different environment -app

  • Procedure to grab PDF from fileSystem store into LONGRAW Datatype.

    Hi All, I have found there are ways to store PDF's from file system into BLOB datatype, but not into LONGRAW. In PeopleSoft we have only LONGRAW type. Can any one send some hints to load PDF's from filesystem into Oralce 10g LONGRAW column. Thanks in

  • Automatic conversion from XDP file fo PDF file

    Hello! I have an application that creates an XDP file with a certain report. I can open the XDP file in Designer 7.0 and then save it as PDF, but I would like to know, how can I automatically produce PDF file from XDP file. Is it possible? Thanks for