Hierarchical Tree : Problem with lost Focus

Forms 6i:
I have a form with a hierarchical tree.
The focus is on the tree.
Now I go into word or an other application. After that I change back to forms.
Now I cannot go into other blocks via mouse. In case, that I click in those records or blocks, I see the focus going into the record and directly going back to the tree-item.
That means, I lose my mouse in tree-forms after changing the windows applications.
Who knows a workaround ?
Gerd

The below given code which only accepts integers + you can not copy and paste
anything in it other than integers.
It also sets the maximum length for a JTextField
import javax.swing.*;
import javax.swing.text.*;
import java.awt.*;
public class maxLengthText extends PlainDocument
int maxVal=0;
public maxLengthText(int maxLength)
maxVal = maxLength;
public void insertString(int offset, String str, AttributeSet a)
throws BadLocationException
if (getLength() + str.length() > maxVal)
return;
else
try
if(!Double.isNaN(Double.parseDouble(str)))
super.insertString(offset, str, a);
catch(Exception e)
JOptionPane.showMessageDialog(null,"Numbers Only","TextField",1,new ImageIcon("Images/warnDel.gif"));
offset=0;
public static void main(String[] args)
Document doc = new maxLengthText(5); // set maximum length to 5
JTextField txtInt= new JTextField(doc, "", 6);
JPanel panel = new JPanel();
panel.add(txtInt);
JFrame frame = new JFrame("My TextField");
frame.setContentPane(panel);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setSize(160, 80);
frame.setVisible(true);
}

Similar Messages

  • Hierarchical tree problem

    Hi,
    I have a hierarchical tree in one my forms that one branch of it has about 2000 nodes the hierarchical tree does not display all the values.
    I've tested with about 1500 and it show correctly.
    Any limitation? any workaround?
    regards

    Hi,
    Something like this:
    SCOTT@soti_9> CREATE TABLE Org(
      2    Org_Id INTEGER,
      3    Org_Name VARCHAR2(100),
      4    Parent_Org_Id INTEGER
      5  );
    Table created.
    SCOTT@soti_9> INSERT INTO Org(Org_Id, Org_Name, Parent_Org_Id) VALUES(1, 'Org_1', NULL);
    1 row created.
    SCOTT@soti_9> INSERT INTO Org(Org_Id, Org_Name, Parent_Org_Id) VALUES(2, 'Org_2', 1);
    1 row created.
    SCOTT@soti_9> INSERT INTO Org(Org_Id, Org_Name, Parent_Org_Id) VALUES(3, 'Org_3', 2);
    1 row created.
    SCOTT@soti_9> INSERT INTO Org(Org_Id, Org_Name, Parent_Org_Id) VALUES(4, 'Org_N', 2);
    1 row created.
    SCOTT@soti_9> COMMIT;
    Commit complete.
    SCOTT@soti_9> CREATE TABLE Members(
      2    User_Id INTEGER,
      3    Org_Id INTEGER
      4  );
    Table created.
    SCOTT@soti_9> INSERT INTO Members(User_Id, Org_Id) VALUES(1, 3);
    1 row created.
    SCOTT@soti_9> INSERT INTO Members(User_Id, Org_Id) VALUES(2, 3);
    1 row created.
    SCOTT@soti_9> INSERT INTO Members(User_Id, Org_Id) VALUES(3, 3);
    1 row created.
    SCOTT@soti_9> INSERT INTO Members(User_Id, Org_Id) VALUES(4, 4);
    1 row created.
    SCOTT@soti_9> INSERT INTO Members(User_Id, Org_Id) VALUES(5, 4);
    1 row created.
    SCOTT@soti_9> COMMIT;
    Commit complete.
    SCOTT@soti_9> WITH Branches AS (
      2    SELECT Org_Id
      3    FROM Org
      4    START WITH Org_Name = 'Org_2'
      5    CONNECT BY PRIOR Org_Id = Parent_Org_Id
      6  )
      7  SELECT COUNT(*)
      8  FROM Branches B
      9    JOIN Members M USING(Org_Id)
    10  ;
      COUNT(*)
             5
    SCOTT@soti_9> WITH Branches AS (
      2    SELECT Org_Id
      3    FROM Org
      4    START WITH Org_Name = 'Org_1'
      5    CONNECT BY PRIOR Org_Id = Parent_Org_Id
      6  )
      7  SELECT COUNT(*)
      8  FROM Branches B
      9    JOIN Members M USING(Org_Id)
    10  ;
      COUNT(*)
             5Regards,
    Dima

  • Problem with window focus in xmonad

    Hi!
    I have the following problem with xmonad:
    Suppose I do the following:
    1) go to fullscreen view
    2) Start an application app1 e.g. evince
    3) start another application on the same workspace app2 e.g. okular
    4) open in app2 a dialogue (e.g. a "file open" dialogue)
    5) press mod + tab until app1 is in the background of the dialogue
    (which is floated)
    6) click on the dialogue-window.
    Now the "background window" changes from app1 to app2. Is there a way
    to disable such a behaviour?
    Thanks
    michael
    Last edited by cm100 (2010-06-12 07:01:38)

    Hi
    It's not necessary to use fm WRITE_FORM, if the data to be written are placed in a window but not assigned to a text element, they will be written automatically.
    So try to check if the data are in text element in your sapscript
    Max

  • Problems with lost bookmarks, keypad not working, apps shutting down

    Out of the blue, while I was still using Safari, all my bookmarks disappeared. No matter how many times I tried to add a bookmark it doesn't show up on my Bookmarks tab. I've tried adding a new folder on my bookmarks tab but it doesn't work either. I don't know what's going on. I've already reset my iPhone once because there were so many problems after I downloaded iOS4.
    Also, I don't recall seeing "History" under the Bookmark tab but now it's there. The History option (along with the websites, etc.) comes and goes. Even after I delete everything from the Settings app, the history still shows up afterwards.
    Any help or suggestions would be appreciated. If I absolutely need to (again), I'll reset my iPhone. I honestly didn't think I was going to have this many problems with iOS4. Everything was perfect before I downloaded the new operating system. I'm also experiencing other problems with iOS4 such as the keypad not working during a phone call and apps shutting down multiple times. Again, any help or suggestions would be great.

    it just sorta started working again

  • Problems with the Focus in different JTables

    Hello,
    I got the following problem.
    First of all, I use a Splitpane to show 8 different tables. Four of them (tables 1-4) are placed in the left part of the Splitpane. The other four tables (5-8) are on the right hand side.
    The four tables on the left got their own TableCellRenderer and the four tables on the right got also their own TableCellRenderer.
    If i load the side, I want the focus to be in table 2 and in table 5. How can i do that? Their is never a focus in any of them at the beginning but I need them in TWO of them.
    Secondly, I don't know how I can leave the one focus between tables 1-4 AND tables 5-8????
    I can click through tables 1-4 without any problems but the focus in one of the tables on the right side disappears. The same on the other side if I click through tables 5-8?
    Can anyone give me an answer? I am looking for hours already and I am so frustrated right now.
    Thank you so much....

    http://www.bulletsandbones.com/GB/GBFAQ.html#recordlinein

  • IOS 8 + landscape mode + AIR SDK 16 & 17 = problem with lost context

    It's seems that the "landscape" orientation make a 100% reproductible beug on my apps when I return to it after calling the camera or "picture explorer" (with a native extension or with AS3, this is the same problem).
    The problem is huge !! : no more texture present on the app, the photo taked with cam is partially visible, sometime a black square blink, no more interaction seems possible.
    I only reproduce this beug in landscape orientation, with ios8 and Air Sdk 17.0.0.124 or Air Sdk 16 on iphone 6.
    No problem with portrait orientation or Air Sdk = 15 or with a different version of ios.
    I've modified the last "Demo_Mobile" example include in starling, put the app in landscape mode and added a simple call to CameraUI, I still have the same problem.
    Any idea ?
    P.S :
    I'm also interested to know if someone else can or can't reproduce the beug on iphone6 with the starling example in landscape mode or
    can simply call the camera in landscape mode without problem on iphone 6 with the SDK 16 or 17.

    Hi,
    I faced the same problem using iAd iOS Extension (Adobe and Milkman Games ANEs).
    When a user clicks on one of the banner ads, a fullscreen pop-up ad is shown, and after closing this screen, the size of my app (a Starling app) is reduced by one third, I get a blinking rectangle on the top of the screen and a white rectangle on the vacuum remaining third to right.
    AIRSDK 16.x.x
    AIRSDK 17.0.0.123
    iOS 8.1
    Best regards,

  • ALV Tree Problem with Checkboxes

    Hello,
    i've got a problem.
    I have an ALV-Tree and die ALV-Detaillist of the tree are type checkbox.
    That's working correct.
    But i want to fill initial data in the checkboxes but the checkbox isnt set.
    i've done as followed:
      CALL METHOD go_alv_tree->set_table_for_first_display
        EXPORTING
         I_STRUCTURE_NAME     =
         IS_VARIANT           =
         I_SAVE               =
          i_default            = abap_false
          is_hierarchy_header  = ls_header
         IS_EXCEPTION_FIELD   =
         IT_SPECIAL_GROUPS    =
         IT_LIST_COMMENTARY   =
         I_LOGO               =
         I_BACKGROUND_ID      =
         IT_TOOLBAR_EXCLUDING =
        CHANGING
          it_outtab            = <go_data_tab>
         IT_FILTER            =
          it_fieldcatalog      = lt_fcat.
    fieldcat are several fields all as checkbox.
    Then i get a component of the output structure and set a X.
    ASSIGN COMPONENT lv_help_arbpl OF STRUCTURE <go_data_struc>
                           TO <fs_arbl>.
          IF <fs_arbl> IS ASSIGNED.
            <fs_arbl> = lc_xfeld.
          ENDIF.
            CALL METHOD go_alv_tree->add_node
              EXPORTING
                i_relat_node_key     = lv_matnr
                i_relationship       = cl_gui_column_tree=>relat_last_child
                is_outtab_line       = <go_data_struc>
                is_node_layout       = ls_layout
             IT_ITEM_LAYOUT       =
                i_node_text          = lv_node_text
              IMPORTING
                e_new_node_key       = lv_period
              EXCEPTIONS
                relat_node_not_found = 1
                node_not_found       = 2
                OTHERS               = 3.
    in <go_data_struc> the fields which should be set, are set with X.
    But after i add all of my nodes and do CALL METHOD p_go_alv_tree->frontend_update, the checkbox is empty but there is an X in the field beside the checkbox.
    Thanks in advance.
    best regards,
    Dennis

    Ok i solved the problem.
    best regards,
    Dennis

  • Problem with showing focus points in 3.5.1 & 10.9

    I cannot always display the focus points either by using Option + F or View > Show Focus Points on my MBP, late 2012.
    Prior to 3.5.1 & 10.9, either one of these commands would always display or remove, the focus points.
    At times I can restore the focus point display by either closing and opening Aperture or by rebooting OS X.  Today, nothing restores this function.
    Anyone else with this problem or hopefully know of a solution?
    Thanks,  Bill
    FWIW Apple, where is Aperture 4??

    Clem
    There is some data in Console.ap, the latest being about 45 minutes ago.  With a filter set for APERTURE there are several references to :
    "12/3/13 2:53:02.038  Aperture[1324]: The function `CGContextClear' is obsolete and will be removed in an upcoming update. Unfortunately, this application, or a library it uses, is using this obsolete function, and is thereby contributing to an overall degradation of system performance."
    and a 13 inch screen full of generally single items.  I do not know how to read / use this info.
    After your message, I went to Aperture and used Option + F, View > Show Focus Points and moused over the small icon representing focal points in the upper right hand corner of the inspector with the info tab selected (just under the JPEG icon) several times but that did not generate any new data in Console.ap.
    Hope this is what you were refering to.
    Bill

  • Screensaver configuration problem with lost iPhoto library

    Hi,  I justed switched my macbook and I used to have another iPhoto library in an external HD that is now gone. I cannot configure the screensaver, I think it searches for my lost iPhoto library and cannot select my current pictures. Can someone help me with this problem? Thanks.

    If the rebuild doesn't help try Fix 101:  make a temporary, backup copy of the library if you don't already have a backup copy and try the following:
    1 - delete the iPhoto preference file, com.apple.iPhoto.plist, that resides in your
         User/Home()/Library/ Preferences folder.
    2 - delete iPhoto's cache file, Cache.db, that is located in your
         User/Home()/Library/Caches/com.apple.iPhoto folder. 
    3 - launch iPhoto and try again.
    NOTE: If you're moved your library from its default location in your Home/Pictures folder you will have to point iPhoto to its new location when you next open iPhoto by holding down the Option key when launching iPhoto.  You'll also have to reset the iPhoto's various preferences.
    OT

  • Problem with requesting focus for a list

    Hi there !
    What would be the right way to request focus for a list component ?
    I can use select() method to select some item from a list, but the list itself still hasn't got a focus until I click it.
    What I'd like to do is to be able to highlight some item from the list by using up and down arrow keys only, without clicking the list first =)

    The list is visible, but still this doesn't work.
    I think that the reason for this may be that I'm running this app on Nokia 9210 Communicator emulator. The emulator itself has had some not-so-minor problems...

  • Problem with tabbed focusing

    I have a question that I'm guessing has a ridiculously simple answer for you gurus, but I still can't figure this out:
    For some reason, I've had a couple of instances where the OS will go into a "tab focusing" mode, where hitting the tab will switch to each item and put a blue highlight around it, whether it's in a dialog box or the bookmarks bar in Safari. The highlight doesn't always function as something I can activate with the enter key or arrows, though (as in the Shut Down dialog box). The first instance of this (I believe) went away on its own, after performing an OS update. In either case, I'm pretty sure I haven't accidentally turned on something in the system preferences.
    Anyone have a quick and dirty explanation (or better yet, a fix!) for this?

    Hi Chris
    it may be that you un-wittingly hit Shift-F7 which toggles Tabbing between "text boxes & lists only" and "All controls"
    I know I've done this a few times
    iMac G5 rev B   (OSX 10.4.7)  2GB 250GB

  • Downloading problem with LOST episode

    I have been trying to download all of the episodes of LOST season 2. i was successful until I reached the episode "Adrift." The episode will not finish downloading. 3 of the other episodes have downloaded and work fine. i am really frustrated because I have read other forums and it seems that MANY people are having this problem and it is not being addressed. i am not sure where to go from here. I have tried re-setting the computer, checking for purchases, browsing my files, and i have contacted tech support...NO HELP!! this is ridiculous because i have spent money and I'd like to receive my product. Can anyone help? Any suggestions??

    Hey there,
    Do you encounter any particular error message? Does it download half-way and stop you? ...or does the error occur right away when you "Check for Purchases..."? If you can give us the exact text of the error message we might be able to help troubleshoot this one more specifically.
    Thanks!
    1.67 GHz G4 PowerBook   Mac OS X (10.4.4)  

  • Occasional problem with lost sound PE10 & XP

    I run PE10 on XP and it works really well. I use a Panasonic Camcorder with memory cards and import sound and video without difficulty (usually). Sometimes (and only sometimes) the sound is missing from part or all of a clip. If I delete the clip and reimport the problem is NOT fixed BUT if I reimport the clip and change its name e.g. 00002 becomes Rep0002 then the new clip is just fine.
    This tells me that the original is fine and that the import process has some sort of flaw, also that deleting the file is insufficient as there must presumably be another component that records some details of the file??
    Is this just a glitch? and should I shrug my shoulders and get a life or is there something else going on??
    Andy

    It sounds as though you didn't let PRE finish conforming the audio. The component recording the details of the audio file is the .cfa file usually to be found in C:\Users\user_name\AppData\Roaming\Adobe\Common\Media Cache Files.
    When you next import a clip to your project check the bottom right of the PRE screen. This will show you the progress  PRE is making in preparing your file for use. Resist the temptation to start work with it immediately - wait for it to finish conforming the audio.
    Cheers,
    Neale
    Insanity is hereditary, you get it from your children

  • Problem with gaining focus for JTextField in JTabPane

    I have 2 tabs. The first one has a "save to file" puush button, the seccond has two textfields. When I push the save button I get a warning that not all fields in the seccond tab are filled. If I choose the first button it shows me the seccond tab and searches for the first empty field. Then it should set the focus to that field but it doesn't. Here's the code:
    void goToEmptyField() {
            tabs.setSelectedIndex(1);
            JTextField field =  (nameField.getText().length() == 0) ? nameField : actionField;
            field.requestFocusInWindow();
        }The code for determining the first empty field works fine. I'm not sure if the seccond tab gets focus or just shows up. It doesn't have the light rectangle at the tab's description. Could anybody help me please?

    seems to work OK in this
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    class Testing extends JFrame
      JTabbedPane tabs;
      JTextField nameField = new JTextField(20);
      JTextField actionField = new JTextField(20);
      public Testing()
        setLocation(400,300);
        setSize(300,200);
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        JPanel jp1 = new JPanel();
        JButton saveBtn = new JButton("Save");
        saveBtn.addActionListener(new ActionListener(){
          public void actionPerformed(ActionEvent ae){
            if(checkFields()) saveData();}});
        jp1.add(saveBtn);
        JPanel jp2 = new JPanel();
        jp2.add(new JLabel("Name: "));
        jp2.add(nameField);
        jp2.add(new JLabel("Action: "));
        jp2.add(actionField);
        tabs = new JTabbedPane();
        tabs.addTab("Tab 1",jp1);
        tabs.addTab("Tab 2",jp2);
        getContentPane().add(tabs);
      public boolean checkFields()
        if(nameField.getText().equals("") || actionField.getText().equals(""))
          JOptionPane.showMessageDialog(this,"field/s empty");
          goToEmptyField();
          return false;
        return true;
      public void goToEmptyField()
        tabs.setSelectedIndex(1);
        JTextField field =  (nameField.getText().length() == 0) ? nameField : actionField;
        field.requestFocusInWindow();
      public void saveData()
        JOptionPane.showMessageDialog(this,"Saving data...");
      public static void main(String[] args){new Testing().setVisible(true);}
    }

  • Problem with lost of the access to the RMI server

    Hi to all.
    We have two applications. First one (master) provides to second (slave) through RMI service their data or other resources.
    In the ordinary way all works fine. But if we need for some reason restart master application, slave can't access to the RMI service and calling of the method Naming.lookup(...) throws java.rmi.UnmarshalException: error unmarshalling return; nested exception is: java.io.EOFException
    Interestingly, calling of method Namig.list(...) at this moment correctly returns an array of the names bound in the registry.
    For completeness, in the time of restarting master application, classes of the RMI services are not changed and thus Stub/Skeleton classes are same on both sides.
    What is reason for this behaviour? It is way to restart/restore RMI access of the slave application to the master without restarting server (Tomcat) of both applications?
    Thank, Roman

    Thank for your reply, but your suggestion not helped me now.
    For registering and binding I used usual practices. Following snippets of code are inside method that perform initialization on application startup. I was trying three versions.
    First version creates registry and binds service classes only. Without any checks.
    try {
      LocateRegistry.createRegistry(rmiPort);
      String ip = Functions.getCurrentEnvironmentNetworkIp();
      if (ip.startsWith("?"))
        throw new Exception("Can't retrieve application IP address.");
      logger.info("Application IP address: " + ip);+
      RMIServiceCommonImpl rmiServiceCommon = new RMIServiceCommonImpl();
      String name = "rmi://" + ip + ":" + rmiPort + "/";
      Naming.rebind(name + IRMIServiceCommon.RMI_SERVICE_COMMON_NAME, rmiServiceCommon);
    catch (Exception e) {
      logger.error("Failed to register RMI services: ", e);
    }On first application start all is OK and client has no problem to access RMI service.
    But if master application is restarted, calling of the method LocateRegistry.createRegistry(rmiPort); throws
    java.rmi.server.ExportException: internal error: ObjID already in use
    Since that, client can't access to the RMI service and following code (method Naming.lookup) throws
    java.rmi.UnmarshalException: error unmarshalling return; nested exception is: java.io.EOFException
      String name = "rmi://" + ConfigServlet.getProperty("rmiHostUrl") + "/";
      IRMIServiceCommon service = (IRMIServiceCommon) Naming.lookup(name + IRMIServiceCommon.RMI_SERVICE_COMMON_NAME);Second version checks if registry exist and trying to get list of registered services. If services not exist Register is created.
    try {
      Registry reg = LocateRegistry.getRegistry(rmiPort);
      String[] list = null;
      try {
        list = reg.list();
      catch (Exception ex) {
        // ignore
      if (list == null || list.length == 0)
        LocateRegistry.createRegistry(rmiPort);
      String ip = Functions.getCurrentEnvironmentNetworkIp();
      if (ip.startsWith("?"))
        throw new Exception("Can't retrieve application IP address.");
      logger.info("Application IP address: " + ip);
      String name = "rmi://" + ip + ":" + rmiPort + "/";
      RMIServiceCommonImpl rmiServiceCommon = new RMIServiceCommonImpl();
      Naming.rebind(name + IRMIServiceCommon.RMI_SERVICE_COMMON_NAME, rmiServiceCommon);
    catch (Exception e) {
      logger.error("Failed to registering RMI services: ", e);
    }Again, first start is OK.
    In this case, after application restart, calling of method Naming.rebind() throws
    java.lang.IllegalStateException at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1272)
    INFO: Illegal access: this web application instance has been stopped already. Could not load eu.arachne.rmi.RMIServiceCommonImpl_Stub.
    This exception is followed by similar exceptions, but differs in class names (stubs) - java.rmi.server.RemoteStub, java.rmi.server.RemoteObject, java.rmi.dgc.Lease, java.rmi.dgc.VMID, java.rmi.server.UID
    Of course, client application can't access to the service.
    The third version first unbinds all services and then performs binding again.
    if (list == null || list.length == 0)
      LocateRegistry.createRegistry(rmiPort);
    else {
      for (int ii = 0; ii < list.length; ii++)
        Naming.unbind(name + list[ii]);
    }But again, rebinding fail as I mentioning above.
    I don't know... :-( How I can solve this problem?
    Thank, Roman

Maybe you are looking for