Strange, setMargin not working on JTextArea

setMargin comes from the JTextComponent which is Parent of JTextArea and JTextField.
I used setMargin(new Insets(2, 4, 0, 4)); in the JTextField and it worked fine of course, but when I tried setting the margin in the JTextArea isn't not working, it's just using its default margin.
Anyone know what's going on here?

It's a subtle gotcha. As described in the JTextComponent javadoc, setMargin(Insets i) doesn't work when the JTextPane has a non-default Border. What worked for me is to provide a getInsets override instead:
  public Insets getInsets()
    return new Insets(2,4,0,4);
  }

Similar Messages

  • RequestFocus() not working for JTextArea

    requestFocus() is not working for JTextArea.
    A validation message is displayed and when clicked on 'ok', requestFocus() does not work. Cursor is not shown in the text
    area.
    Any suggestions/solutions pls?

    here is the sample code:
    public boolean checkData()
    String comment = commentArea.getText().trim();
    if( comment.length() < MN_COMMENT || comment.length() > MX_COMMENT )
    showError(COMMENT_ALERT);
    commentArea.requestFocus();
    return false;
    return true;
    Focus is lost. TextArea is in scroll pane. Scroll pane is contanined in a container pane and pane is for JDialog.
    RequestFocus() is working for JRE 1.5.0_07. But its not working for JRE 1.5.0_0 and lower versions.

  • Resize smaller not working for JTextArea

    I have a series of JTextAreas and JTextFields being added to a JPanel. The problem is I want them to always be the same size as the JPanel in the horizontal direction. This works fine for expanding the window, the JTextAreas and JTextFields expand with the panel to the edge, but then when I try to shrink the window the fields keep their maximum width as their width so when input is given to the field it does not word wrap until it has reached the edge of the maximum width rather than the current width.
    Here's the relevant code:
    JPanel rightSide = new JPanel();
           GridBagLayout gridBag = new GridBagLayout();
           GridBagConstraints constraints = new GridBagConstraints();
           rightSide.setLayout(gridBag);
           constraints.fill = GridBagConstraints.BOTH;
           rightSide.setBackground(BGCOLOR);
           Iterator iter = leafs.iterator();
           constraints.fill = GridBagConstraints.BOTH;
           constraints.weighty = 0.0;
           constraints.weightx = 1.0;
           constraints.gridwidth = GridBagConstraints.REMAINDER;
           while(iter.hasNext()){
             compare = (LeafItem)iter.next();
             textComponent =  compare.getComponent();
             //if the leaf needs a textArea put it in a scrollPane
             if(textComponent.getClass().equals(JScrollPane.class)){
               JLabel label = new JLabel(compare.getDescriptiveName());
               JTextArea textArea = new JTextArea();
               textArea.setLineWrap(true);
               textArea.setWrapStyleWord(true);
               if(HAS_BORDER)
              textArea.setBorder(blackline);
               gridBag.setConstraints(label, constraints);
               gridBag.setConstraints(textArea, constraints);         
               rightSide.add(label);
               rightSide.add(textArea);
             else{
               JLabel label = new JLabel(compare.getDescriptiveName());
               JTextField text = new JTextField();
               gridBag.setConstraints(label, constraints);
               gridBag.setConstraints(text, constraints);
               rightSide.add(label);
               rightSide.add(text);
           rightSide.setBorder
             (BorderFactory.createEmptyBorder(5, 10, 10, 10));
           JPanel remainder = new JPanel();
           remainder.setBackground(BGCOLOR);
           constraints.weighty = 1.0;
           constraints.weightx = 0.0;
           gridBag.setConstraints(remainder, constraints);
           rightSide.add(remainder);
           JScrollPane scrollPane = new JScrollPane
             (rightSide, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,
              JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
           splitPane.setRightComponent(scrollPane);
         }

    I'm thinking it may be a bug with JSplitPane.Hm ... maybe our understanding of the JSplitPane is wrong in this context - I try to imagine, if it is normally needed, that components within one of this panes should be resized so that they fit the viewport. If I think about that, I have to say "normally not" - so, I guess, that is not a bug, it should be done in another way.
    Also I do not really understand, in which way you want them to be resized - if you shift the pane separator, the components should not be resized, or do you want them to be resized so that they fit the smaller viewport too?- And if you want them to resize, what if you hide one pane totally?-
    When asking myself this questions, it seems to me, that JSplitPane works correct the way it does it - the effect, you want, must be done in another way and also more specified, I guess.
    greetings Marsian

  • Compiz-fusion + kdemod very strange results / not working properly

    Sorry if this has been addressed before but I could not find mention of it.
    I have a pavilion ze5185 laptop that has an ATI radeon mobility M6 LY.
    I am running kdemod and I am having trouble getting compiz-fusion working correctly.
    here is the screenshot:
    you can see on the right and along the bottom that there is a strange redraw problem.  that portion of the screen goes black when i enable compiz.  then if i drag a window in that area it just smears the window image around there.
    has anyone seen this before?  any ideas?
    thanks
    edit:
    here is my xorg.conf:
    Section "ServerLayout"
    Identifier "X.org Configured"
    Screen 0 "Screen0" 0 0
    InputDevice "Mouse0" "CorePointer"
    InputDevice "Touchpad" "SendCoreEvents"
    InputDevice "Keyboard0" "CoreKeyboard"
    # Option "VertTwoFingerScroll" "1"
    Option "AIGLX" "true"
    EndSection
    Section "Extensions"
    Option "Composite" "Enable"
    EndSection
    Section "Files"
    RgbPath "/usr/share/X11/rgb"
    ModulePath "/usr/lib/xorg/modules"
    FontPath "/usr/share/fonts/misc"
    FontPath "/usr/share/fonts/100dpi:unscaled"
    FontPath "/usr/share/fonts/75dpi:unscaled"
    FontPath "/usr/share/fonts/TTF"
    FontPath "/usr/share/fonts/Type1"
    EndSection
    Section "Module"
    Load "glx"
    Load "extmod"
    Load "xtrap"
    Load "record"
    Load "GLcore"
    Load "dbe"
    Load "drm"
    Load "dri"
    Load "freetype"
    Load "synaptics"
    EndSection
    Section "InputDevice"
    Identifier "Keyboard0"
    Driver "kbd"
    EndSection
    Section "InputDevice"
    Identifier "Mouse0"
    Driver "mouse"
    Option "Protocol" "auto"
    Option "Device" "/dev/input/mice"
    Option "ZAxisMapping" "4 5 6 7"
    EndSection
    Section "InputDevice"
    Identifier "Touchpad"
    Driver "synaptics"
    Option "Device" "/dev/input/mouse0"
    Option "Protocol" "auto-dev"
    Option "LeftEdge" "1700"
    Option "RightEdge" "5300"
    Option "TopEdge" "1700"
    Option "BottomEdge" "4200"
    Option "FingerLow" "25"
    Option "FingerHigh" "30"
    Option "MaxTapTime" "180"
    Option "MaxTapMove" "220"
    Option "VertScrollDelta" "100"
    Option "MinSpeed" "0.06"
    Option "MaxSpeed" "0.12"
    Option "AccelFactor" "0.0010"
    Option "SHMConfig" "on"
    EndSection
    Section "Monitor"
    Identifier "Monitor0"
    VendorName "Monitor Vendor"
    ModelName "Monitor Model"
    EndSection
    Section "DRI"
    Group "video"
    Mode 0666
    EndSection
    Section "Device"
    ### Available Driver options are:-
    ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
    ### <string>: "String", <freq>: "<f> Hz/kHz/MHz"
    ### [arg]: arg optional
    #Option "NoAccel" # [<bool>]
    #Option "SWcursor" # [<bool>]
    #Option "Dac6Bit" # [<bool>]
    #Option "Dac8Bit" # [<bool>]
    #Option "BusType" # [<str>]
    #Option "CPPIOMode" # [<bool>]
    #Option "CPusecTimeout" # <i>
    Option "AGPMode" "2" # <i>
    Option "AGPFastWrite" "yes" # [<bool>]
    #Option "AGPSize" # <i>
    #Option "GARTSize" # <i>
    #Option "RingSize" # <i>
    #Option "BufferSize" # <i>
    #Option "EnableDepthMoves" # [<bool>]
    Option "EnablePageFlip" "on" # [<bool>]
    #Option "NoBackBuffer" # [<bool>]
    #Option "DMAForXv" # [<bool>]
    #Option "FBTexPercent" # <i>
    #Option "DepthBits" # <i>
    #Option "PCIAPERSize" # <i>
    #Option "AccelDFS" # [<bool>]
    #Option "DDCMode" # [<bool>]
    #Option "IgnoreEDID" # [<bool>]
    #Option "DisplayPriority" # [<str>]
    #Option "PanelSize" # [<str>]
    #Option "ForceMinDotClock" # <freq>
    Option "ColorTiling" "on" # [<bool>]
    #Option "VideoKey" # <i>
    #Option "RageTheatreCrystal" # <i>
    #Option "RageTheatreTunerPort" # <i>
    #Option "RageTheatreCompositePort" # <i>
    #Option "RageTheatreSVideoPort" # <i>
    #Option "TunerType" # <i>
    #Option "RageTheatreMicrocPath" # <str>
    #Option "RageTheatreMicrocType" # <str>
    #Option "ScalerWidth" # <i>
    #Option "RenderAccel" # [<bool>]
    #Option "SubPixelOrder" # [<str>]
    #Option "ShowCache" # [<bool>]
    #Option "DynamicClocks" # [<bool>]
    #Option "VGAAccess" # [<bool>]
    #Option "ReverseDDC" # [<bool>]
    #Option "LVDSProbePLL" # [<bool>]
    #Option "AccelMethod" "XAA" # <str>
    Option "DRI" "true" # [<bool>]
    #Option "ConnectorTable" # <str>
    #Option "DefaultConnectorTable" # [<bool>]
    #Option "DefaultTMDSPLL" # [<bool>]
    #Option "TVDACLoadDetect" # [<bool>]
    #Option "ForceTVOut" # [<bool>]
    #Option "TVStandard" # <str>
    #Option "IgnoreLidStatus" # [<bool>]
    Identifier "Card0"
    Driver "radeon"
    Option "XAANoOffscreenPixmaps" "true"
    VendorName "ATI Technologies Inc"
    BoardName "Radeon Mobility M6 LY"
    BusID "PCI:1:0:0"
    EndSection
    Section "Screen"
    Identifier "Screen0"
    Device "Card0"
    Monitor "Monitor0"
    DefaultDepth 24
    SubSection "Display"
    Viewport 0 0
    Depth 1
    EndSubSection
    SubSection "Display"
    Viewport 0 0
    Depth 4
    EndSubSection
    SubSection "Display"
    Viewport 0 0
    Depth 8
    EndSubSection
    SubSection "Display"
    Viewport 0 0
    Depth 15
    EndSubSection
    SubSection "Display"
    Viewport 0 0
    Depth 16
    Modes "1400x1050"
    EndSubSection
    SubSection "Display"
    Viewport 0 0
    Depth 24
    Modes "1400x1050"
    EndSubSection
    EndSection
    Last edited by speed145a (2008-05-13 18:51:10)

    Sorry if this has been addressed before but I could not find mention of it.
    I have a pavilion ze5185 laptop that has an ATI radeon mobility M6 LY.
    I am running kdemod and I am having trouble getting compiz-fusion working correctly.
    here is the screenshot:
    you can see on the right and along the bottom that there is a strange redraw problem.  that portion of the screen goes black when i enable compiz.  then if i drag a window in that area it just smears the window image around there.
    has anyone seen this before?  any ideas?
    thanks
    edit:
    here is my xorg.conf:
    Section "ServerLayout"
    Identifier "X.org Configured"
    Screen 0 "Screen0" 0 0
    InputDevice "Mouse0" "CorePointer"
    InputDevice "Touchpad" "SendCoreEvents"
    InputDevice "Keyboard0" "CoreKeyboard"
    # Option "VertTwoFingerScroll" "1"
    Option "AIGLX" "true"
    EndSection
    Section "Extensions"
    Option "Composite" "Enable"
    EndSection
    Section "Files"
    RgbPath "/usr/share/X11/rgb"
    ModulePath "/usr/lib/xorg/modules"
    FontPath "/usr/share/fonts/misc"
    FontPath "/usr/share/fonts/100dpi:unscaled"
    FontPath "/usr/share/fonts/75dpi:unscaled"
    FontPath "/usr/share/fonts/TTF"
    FontPath "/usr/share/fonts/Type1"
    EndSection
    Section "Module"
    Load "glx"
    Load "extmod"
    Load "xtrap"
    Load "record"
    Load "GLcore"
    Load "dbe"
    Load "drm"
    Load "dri"
    Load "freetype"
    Load "synaptics"
    EndSection
    Section "InputDevice"
    Identifier "Keyboard0"
    Driver "kbd"
    EndSection
    Section "InputDevice"
    Identifier "Mouse0"
    Driver "mouse"
    Option "Protocol" "auto"
    Option "Device" "/dev/input/mice"
    Option "ZAxisMapping" "4 5 6 7"
    EndSection
    Section "InputDevice"
    Identifier "Touchpad"
    Driver "synaptics"
    Option "Device" "/dev/input/mouse0"
    Option "Protocol" "auto-dev"
    Option "LeftEdge" "1700"
    Option "RightEdge" "5300"
    Option "TopEdge" "1700"
    Option "BottomEdge" "4200"
    Option "FingerLow" "25"
    Option "FingerHigh" "30"
    Option "MaxTapTime" "180"
    Option "MaxTapMove" "220"
    Option "VertScrollDelta" "100"
    Option "MinSpeed" "0.06"
    Option "MaxSpeed" "0.12"
    Option "AccelFactor" "0.0010"
    Option "SHMConfig" "on"
    EndSection
    Section "Monitor"
    Identifier "Monitor0"
    VendorName "Monitor Vendor"
    ModelName "Monitor Model"
    EndSection
    Section "DRI"
    Group "video"
    Mode 0666
    EndSection
    Section "Device"
    ### Available Driver options are:-
    ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
    ### <string>: "String", <freq>: "<f> Hz/kHz/MHz"
    ### [arg]: arg optional
    #Option "NoAccel" # [<bool>]
    #Option "SWcursor" # [<bool>]
    #Option "Dac6Bit" # [<bool>]
    #Option "Dac8Bit" # [<bool>]
    #Option "BusType" # [<str>]
    #Option "CPPIOMode" # [<bool>]
    #Option "CPusecTimeout" # <i>
    Option "AGPMode" "2" # <i>
    Option "AGPFastWrite" "yes" # [<bool>]
    #Option "AGPSize" # <i>
    #Option "GARTSize" # <i>
    #Option "RingSize" # <i>
    #Option "BufferSize" # <i>
    #Option "EnableDepthMoves" # [<bool>]
    Option "EnablePageFlip" "on" # [<bool>]
    #Option "NoBackBuffer" # [<bool>]
    #Option "DMAForXv" # [<bool>]
    #Option "FBTexPercent" # <i>
    #Option "DepthBits" # <i>
    #Option "PCIAPERSize" # <i>
    #Option "AccelDFS" # [<bool>]
    #Option "DDCMode" # [<bool>]
    #Option "IgnoreEDID" # [<bool>]
    #Option "DisplayPriority" # [<str>]
    #Option "PanelSize" # [<str>]
    #Option "ForceMinDotClock" # <freq>
    Option "ColorTiling" "on" # [<bool>]
    #Option "VideoKey" # <i>
    #Option "RageTheatreCrystal" # <i>
    #Option "RageTheatreTunerPort" # <i>
    #Option "RageTheatreCompositePort" # <i>
    #Option "RageTheatreSVideoPort" # <i>
    #Option "TunerType" # <i>
    #Option "RageTheatreMicrocPath" # <str>
    #Option "RageTheatreMicrocType" # <str>
    #Option "ScalerWidth" # <i>
    #Option "RenderAccel" # [<bool>]
    #Option "SubPixelOrder" # [<str>]
    #Option "ShowCache" # [<bool>]
    #Option "DynamicClocks" # [<bool>]
    #Option "VGAAccess" # [<bool>]
    #Option "ReverseDDC" # [<bool>]
    #Option "LVDSProbePLL" # [<bool>]
    #Option "AccelMethod" "XAA" # <str>
    Option "DRI" "true" # [<bool>]
    #Option "ConnectorTable" # <str>
    #Option "DefaultConnectorTable" # [<bool>]
    #Option "DefaultTMDSPLL" # [<bool>]
    #Option "TVDACLoadDetect" # [<bool>]
    #Option "ForceTVOut" # [<bool>]
    #Option "TVStandard" # <str>
    #Option "IgnoreLidStatus" # [<bool>]
    Identifier "Card0"
    Driver "radeon"
    Option "XAANoOffscreenPixmaps" "true"
    VendorName "ATI Technologies Inc"
    BoardName "Radeon Mobility M6 LY"
    BusID "PCI:1:0:0"
    EndSection
    Section "Screen"
    Identifier "Screen0"
    Device "Card0"
    Monitor "Monitor0"
    DefaultDepth 24
    SubSection "Display"
    Viewport 0 0
    Depth 1
    EndSubSection
    SubSection "Display"
    Viewport 0 0
    Depth 4
    EndSubSection
    SubSection "Display"
    Viewport 0 0
    Depth 8
    EndSubSection
    SubSection "Display"
    Viewport 0 0
    Depth 15
    EndSubSection
    SubSection "Display"
    Viewport 0 0
    Depth 16
    Modes "1400x1050"
    EndSubSection
    SubSection "Display"
    Viewport 0 0
    Depth 24
    Modes "1400x1050"
    EndSubSection
    EndSection
    Last edited by speed145a (2008-05-13 18:51:10)

  • Strange boot bug; open firmware not working

    Hi!
    I have a powerbook Alu 15", 1.5Ghz. It runs OS X 10.4.2 with the latest security update. My problem started last Saturday.
    The problem is that my pb will not restart nor boot on its own. The computer makes its usual chime, the hard-disk starts to spin for a few second, and then stops suddenly before anything is displayed on the screen (the display does not even light-up). If I press the option key after or before the chime, and keep it pressed, or the shift key, or the c key, or the t key, or the command-option-p-r key combination, or even the command-option-o-f key combination, the behavior is exactly the same: the disk starts to spin for a few second after the chime, and suddenly halts. The computer appears to shutdown on its own before the boot can even start.
    Here is the strange part: the computer boots normally if I press the command key (this key on its own is not suppose to do anything). It also works if I press the command-s or command-v key combination. No other key combination seem to work.
    Except for this strange boot behavior, the computer works flawlessly. I did not have any kernel panic for at least a year, the computer did not crash recently, everything works fine except for one small detail on which I will come back at the end.
    I've tried to fix the problem by the following actions:
    1) Clean install of Tiger with a new partitioning of the disk; I even zeroed the entire disk. This did not change anything so the problem is probably not OS related.
    2) Reset of the PMU with the four finger salute: shift-control-option-power combination. No effect except that I lost the date/time information. Hence the reset worked.
    3) Tried to reset the PRAM, but the command-option-p-r key combination does not seem to work.
    4) Tried to load the open firmware with command-option-o-f, but this does not work either.
    5) Memory seems ok. I have 1x256M of Apple RAM + 1x1G of RAM bought from OWC. I've had the OWC RAM for about a year without any problem. Anyway, I removed the 1G module and tried to boot on the 256M Apple module alone. Exact same behavior. Then I removed the Apple module and put back the 1G module. Exact same boot behavior. So the problem is not with my RAM, unless both modules have simultaneously developed a malfunction.
    6) Tried to run the Apple hardware tests. However, for my machine, these tests come on the install DVD, in a special hidden volume. To boot on this special volume, one needs to boot with the option key depressed, and to select the boot volume from the open firmware interface. But this does not work on my machine, the computer seems to shut down before this interface can be activated!
    So this problem is very strange. I can live with having to press the command key for booting my machine, but I would sure like to know what is going on here. Is the problem hardware related? Perhaps, but as I said, the machine works flawlessly except for the strange boot behavior.
    Is the problem related to firmware? I think that this is the most probable option. What do you think? Maybe, the firmware got slightly corrupted? Maybe a bit got flipped in the flash memory? Is this possible? I guess so. But, what can I do? Should I contact my friendly local repairman?! I have to admit that this option scares me a little bit for such a strange problem. I would need an Apple engineer with boot related experience/expertise!
    Now, here is a little bit of further information. I don't know if its related, but it is also very strange. I work with a dual screen configuration. Usually, I connect my screen and then I wake up the computer. Last week, I noticed that if I connect my second screen live, the system detects it automatically. I guess this is new to Tiger? Anyway, the strange behavior is that the computer then asks me if I want to sleep, restart or shutdown my pb, as if I had pressed the power button. But I did not press this button when I connected the dvi connector >:-o
    Many thank

    Hi Scott!
    Almost every time the PowerBook woke after sleep, I got the 'Are you sure you want to shut down your computer now...' message.
    I get this message upon wake only rarely, but every time I plug or unplug a display live.
    The strange behaviour was tolerable, so I've lived with it for several months. But then when checking out the PowerBook discussions, I read about the failing lower RAM slot problems, and just out of interest, checked out my System Profiler....
    Ok, so the good news is that my pb may continue to work for several months
    My lower RAM slot appears to be ok for now.
    Interestingly, I'm sure that the start-up problems began when I started using my PowerBook with a 23" Apple Cinema Display (a pink hued one, but that's another on-going saga) - and you too have mentioned that you use an external display, so I wonder if that's part of the cause of our start-up problems.
    Yes, I've noticed the 'Are you sure you want to shut down your computer now...' message just a few days before noticing the strange boot problem (not sure if the machine booted in between). I use ViewSonic displays (one at home and one at the office), and several different projectors in different class rooms. From what I read, it is plausible that there is a link between this problem and the dvi port. Could it be that the boot sequence of mb is affected by a hardware problem on the dvi port? But not when a press the command key?!
    Anyway, my machine is no longer under warranty, so I intend to live with the problem for as long as possible...
    But I've been doing more regular backups since then.
    Best wishes to you and your (almost) new machine!
    Marc.

  • Internet does not work after kernel upgrade (quite strange)

    Hi guys
    My internet (only at home) does not work anymore with kernel 2.6.27. at university it works just fine. isn't that funny
    it has something to do with packet sizes interestingly enough... because i can ping "the internet" (i.e. kernel.org) just fine at home but wget kernel.org fails. ping -s 1000 fails as well, so it's probably really related to packet size.
    I use DSL which has a strange value for MTU i heard, but it works just fine with lower kernel versions. I am a bit lost by now...
    Btw: it's actually not arch-patch-related, so sorry for posting this here (i already mailed it to the lkml) but i thought maybe there are people here who are interested in strange problems
    cheers Barde
    PS: what i meant to say actually is that if you're not interested in my problem, just ignore this thread

    Ok, I downgraded again, very carefully & rebooted to an internet working as it should be.
    Sorry for throwing some confusion on the matter, I had, had a very long day with an Arch install that went wrong(!)  the day before & must have been brain addled when downgrading yesterday.
    I will now have another look at the machine that's install is stuck & see if I can understand why, with my new found knowledge.
    Thanks to all for your much needed help.
    [Edit:]
    My 2nd machine was suffering the same problem which it caught during a fresh install of Arch!
    I have edited some of my previous posts to try to remove confussion created by my failed first downgrade attempt. {embarrassment}
    Last edited by handy (2008-10-18 00:14:44)

  • Making the Tab key not work in the JTextArea

    In my view I have a JTextArea along with a bunch of JTextFields and JComboBoxes. The user is usually going to tab out of a field in order to go to the next field. What's happening is when the user tries to tab out of the JTextArea, the cursor just moves by a tab length within the JTextArea instead of going to the next field. And if the JextArea has some text in it and if the user tabs into the JTextArea, the whole text gets selected and on hitting the next tab, it gets wiped out.
    I am trying to make the JTextArea not respond to the tab by writing the following code. Keymap keyMap = JTextComponent.getKeymap(JTextComponent.DEFAULT_KEYMAP);
    KeyStroke tabKey = KeyStroke.getKeyStroke(KeyEvent.VK_TAB, 0, false);
    keyMap.removeKeyStrokeBinding(tabKey);
    jTextArea1.setKeymap(keyMap);But it's still not working. Can anybody tell what's wrong with that code. Or is there any other way to do it? Any help/hints appreciated.
    Thanks.

    >
    If you're using jdk1.4, those other solutions won't
    work because the focus subsystem has changed radically
    (see
    http://java.sun.com/j2se/1.4/docs/api/java/awt/doc-file
    /FocusSpec.html). The upshot is that you have to
    specifically register the keystrokes that you want to
    use for focus traversal. In your case, you have to
    re-register the Tab and Shift-Tab keys, and
    they don't seem to have provided a simple way to do
    that. Here's what I come up with:Set forwardTraversalKeys = new TreeSet();
    forwardTraversalKeys.add(KeyStroke.getKeyStroke(
    KeyEvent.VK_TAB));
    forwardTraversalKeys.add(KeyStroke.getKeyStroke(
    KeyEvent.VK_TAB, InputEvent.CTRL_MASK));
    textArea.setFocusTraversalKeys(
    KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS,
    forwardTraversalKeys);
    Set backwardTraversalKeys = new TreeSet();
    backwardTraversalKeys.add(KeyStroke.getKeyStroke(
    KeyEvent.VK_TAB, InputEvent.SHIFT_MASK));
    backwardTraversalKeys.add(KeyStroke.getKeyStroke(
    KeyEvent.VK_TAB, InputEvent.SHIFT_MASK |
    K | InputEvent.CTRL_MASK));
    textArea.setFocusTraversalKeys(
    KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS,
    backwardTraversalKeys);Or, you can just press CTRL+TAB instead of TAB when
    you get to the JTextArea :).=====================================
    i used the above thing but i am getting exceptions classcast exception n method not found (forwardTraversalKeys.add(KeyStroke.getKeyStroke(KeyEvent.VK_TAB));)keystroke.get keyStroke(int)???? where i am going wrong as it will be quite helpful for me am using jdk1.4.1_02
    thnaks

  • My MBP  15" early 2008 / 10.6 ((2.4GHz Core 2 Duo/2GB/256MB VRAM/200GB 5400rpm)  is not working after looking to aYouTube short film. It made a strange strong noise , I closed it and when I switched on again I have a gray display and a frozen wheel o

    My MBP  15" early 2008 / 10.6 ((2.4GHz Core 2 Duo/2GB/256MB VRAM/200GB 5400rpm)  is not working after looking to aYouTube short film. It made a strange strong noise , I closed it and when I switched on again I have a gray display and a frozen wheel on it... Can you help? Do I have to repair or change any part ?  Thanks

    That model has a known fault in that Nvidea sold Apple and other computer manufacturers bad GeForce 8600M GT video chipsets that failed eventually. Apple had a program that repaired this at no cost to the owner but it expired almost two years ago.
    If this is what happened to yours, and the symptoms suggest so, the only proper fix is a new logic board and I amd pretty sure Apple no longer has parts. When my Late 2007 MBP (same faulty chipset) failed, Apple told me there were no more parts and they could not even do the fixed-rate "depot repair" on mine even though I was willing to pay the ~US$300 for the repair.
    The early 2008 MBP is on the vintage and obsolete list:
    Vintage and obsolete products - Apple Support
    The fact that yours is shown as "vintage" means Apple will not work on it but an independent service provider MAY be able to get the parts from Apple. However, as so may new logic boards were required to satisfy the repair program, from a practical standpoint boards for these are hard to find.

  • Ethernet not working, strange problem

    Hi Everyone,
    I have a very strange problem. I haven't had internet at my new apartment all summer and have been using my schools internet to use the internet. I typically would go to the computer lab and use the ethernet cable to plug in and it worked fine. However the other day i went to a different room and connected there and that worked fine, but now if i go back to the computer lab it says my IP is being used by another device.
    Stranger further, now that i got internet at my place my computer won't even read it, it says its connected but can't get online, while my suitemate has no problem what so ever. Any hints as to what might be going on?
    The thing is if i go back to that classroom and plug in it works but anywhere else my ethernet connection does not work.
    I have a MacBook Pro, bought last summer running Lion.
    Jacob

    I am having the same issue, Jacob.  In late August, I was working on a wired network at a hotel during business travel.  One day, I was fine.  The next morning, I received the same information...that my IP address was being used by another computer.  My business partner logged in to the network from his Linux machine without this issue, so it isn't the cable or the network itself.
    I am now unable to login on any wired network.  And it now appears I am unable to create an ethernet connection anymore.
    Has anyone resolved this issue?

  • Strange Boot problem with iMac OSX 10.7.5 (Boot loop, not working safe boot etc.)

    Hey guys,
    I've got a strange problem with my iMac Late 2009. This morning it didn't want to boot (grey screen with turning wheel). Yesterday when I shut it down everything was fine. Last backup was finished three minutes before. So I was a bit shirty but noch scared of any data loss.
    I tried  the following things:
    1. boot recovery and check hdd (it's a new one, only second day back from apple store for replacing seagate hdd), everythings fine
    2. try to boot in safe mode, did not work!
    3. try to boot in verbose mode, did work until it stopped. Screenshot of the last lines of log is within this post
    4. I used my TM backup and afterwards I could boot! Strange, because as I sad the backup finished a few minutes beforce I left my mac and shut it down
    Now I'm a bit scared of shutting it down again But what would be the next step to find the error? My first thought were some third party kernel extensions, but that would not affect a safe mode boot, am I right? I have a Macbook Air here which is setup nearly identical to my mac and it's working. Could it be a hardware fault? Maybe you've got an idea.
    Thanks!
    Max

    at the moment it seems to be a corrupted time machine backup from my old hard drive (new one has a runtime of 27 hours). So I'll will try a clean install of my system at least, when I got the time. sh%&$ !

  • Upper speaker in my new iPhone 4 does not work properly. I hear strange sounds instead of speech. What to o?

    Upper speaker in my new iPhone 4 does not work. When somebody calls me I hear only strange sounds. Please, help!

    A couple of other things you can try -
    With my 2010 Ford Fusion (and SYNC) I received the same not optimized message a few times. There were several things I had to do but eventually, I got it cleared up. Not sure exactly how this will translate to your Toyota but maybe it will.
    - Try resetting the iPhone via a power off/on or a hard reset where you hold the home and power buttons. Then power back on and plug into your USB port.
    - In my case I had an issue with SYNC in my car where I needed to reset the USB port in my car. Not sure if Toyota has something similar. The fact that you said it won't charge makes me wonder if the USB port got disabled in your car. This happened in my car and an easy reset for me was to remove a fuse for a few minutes and replace.
    - Update your iPhone in iTunes and resync it there. Then try connecting again in yor car.
    - Delete and re pair your iPhone from your Toyota system
    Hope something here helps. Thanks

  • ALV Filter : Not working for a text field - Strange problem

    Dear All,
    I have a Z-program where the ALV filter is not working on a particular text field.
    The output on that text field is as below :
    ABCD
    JKLM
    YYZZ
    ABCD
    JKLM
    ABCD
    JKLM
    YYZZ
    YYZZ
    When we try to filter on YYZZ, it gives blank list. But for other options given abobe it works fine.
    I know it is because of the negative sign , but how can we over come this problem ?
    Thanks in advance,
    Sandip.

    Hi Sandip,
    Use 'LOWERCASE' in the fieldcatalog.
    For the particular text field when you are appending the Fieldcatalog structure to the Fieldcatalog Table
    ( Suppose LS_FIELDCAT)
    Then check the LOWERCASE field.
    (LS_FIELDCAT-LOWERCASE = 'X' )
    This will serve the purpose.
    Regards,
    Sourav

  • Strange problem: flash not working properly in IE

    http://avcgroup.golive.titaninternet.co.uk/
    This is a link to the webpage where is my flash gallery. When
    u open the it u will see the gallery on top, little pictures will
    appear and will slide to the left. When u click on a small picture,
    a big picture will appear of the same little picture. The problem
    is that in mozilla firefox and opera for example it works perfectly
    but when u open it with interner explorer 7, most of the times when
    u click on a small pic, just the window where the big pic should
    load shows up, but the pic doesn't load... if u close it and open
    it second time it opens. The script is the same for all pics. I
    don't understand why it is not working in IE. Anyone with more
    experiance should have already faced this problem.. and maybe
    figured out why this happens... please help !
    Thanks in advance.
    P.S.
    The link is temporarily, so to speak it content changes cuz
    of testing differnt things so u will see my gallery if the date u
    read my question is close to the date I've made this post.

    I'm also having extreme problems with Flash. I did the
    uninstaller thing too, I re-booted over & over again & it's
    still not working. I can't view anything that uses Flash!!! It
    shows up as being installed on my computer, but all the websites I
    go to say "you don't have the new version installed-install now."
    There's a link to install, I get the pop up on my toolbar to
    install Active-X, but nothing happens.
    If anyone has new info...please help

  • Installed Mavericks and latest iWorks and some fonts will not work. Strangely these fonts work in Notes and old version of Strickies. Any ideas?

    Installed Mavericks and latest updates for iWorks. Some fonts will not work on Pages or Keynote. Any ideas?

    It appears overkilling to install Bootcamp and a complete Windows environment just for running a single, old-fashioned piece of software...
    Old 32-bits Windows programs usually run fine with WINE, of which I warmly recommend the "PlayonMac" version (free).
    http://www.playonmac.com
    Just try with Playonmac...
    If it does not work, try the other free WINE port for Mac, Winebottler:
    http://winebottler.kronenberg.org/
    If even this does not work, there is a not-free WINE port named Crossover:
    http://www.codeweavers.com/products/crossover-mac/
    It has a free trial mode, so you can test if it works with your scanner program before purchasing it...

  • Left mouse controls not working... very strange

    I don't believe this is unique to R40 so any help would be appreciated 
    I have just installed new hard drive and now the left track point and ultranav left mouse does not work. If I go to
    mouse>ultranav> settings> buttons> left click  and select jump to start it works until standby power off or logon screen. So
    again it works until any of the above and then I need a usb mouse to re enable the left mouse control. I do not believe it is a
    hardware issue as all 3 left click methods will work until standby etc. i have re-installed latest drivers and am now considering a
    reinstall of Windows XP.
    Any suggestions???
    R40 2723

    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

Maybe you are looking for

  • Fields missing in Designer 2010 workflow

    I created few yes/No column through Association Columns in Designer but now the value is missing and my workflow crashes. i fixed it saved and published the workflow yesterday. when i opened the workflow this morning i see the same issue. when i trie

  • No longer able to drag and drop

    after purchasing songs from itunes I am no longer able to drag and drop from itunes to ipod

  • How do I enable EAX and S

    I have the c00 player the creative media organizer came with it and was looking through some of the features and the SVM looks very interesting. However when I go to enable it, its greyed out. I have already scanned all my music, do I need to have a

  • BDC message parameter(MSGTYP) by default coming Success

    Hi, In my BDC program by default the message type is coming success, whatever flat file I pass. Does anybody have any idea about this, letme know(kind of urgent). Thanks, Soumya Ranjan Patel.

  • BILL OF MATERIAL USING THE DI OBJECT

    Hi All, IS IT POSSIBLE TO ADD THE BILL OF MATERIAL USING THE DI OBJECT..... Thanks, MADHUSUDHANA RAO.G