Defaultbutton in a frame with a jtable

Hello,
if I have a JFrame with a JButton and a JList and the JButton is a DeafultButton, then the enter-key-event will be processed by the defaultButton.
But if I use a JTabel instead of the JList, then the enter-key-event will be processed by the JTable.
Is there a good reason, why SUN has choosen this policy?
You can have example-code from me!
Best Regards
Frank Rettweiler

Hi Frank,
I guess the reason for this behaviour is because a table (eg. table cell) is default editable, and a jlist isn't.
If you change the table or list to a textfield you will get the same behaviour as for the table, and the default for a textfield is that it's editable.
Qualified guess? You decide.
Regards.
/ David

Similar Messages

  • Delimited output of report that contains frames with Print Direction = 'Across'

    Hello all.
    On the header section of my report, I have a frame with Print Direction = 'Across'.
    On screen the output is :
    Value1 Value2 Value3 Value 4
    I want to export this report to excel, by using DELIMITED option. However the output I'm getting is :
    Value1
    Value2
    Value3
    Value4
    e.g., reports is not generating several columns (one for each field), but separate lines.
    Anyone knows how to accomplish delimited output of frames with Print Direction='Across' ?
    Thanks in Advance,
    Octavio

    If you're not generating both bitmap and delimited data from the same report, try using character mode output rather than "delimited". You can create the report to generate the appropriately delimited values to a text file. This will also give you greater control over aspects such as headings.
    Delimited output simply uses the structure of the layout. It doesn't take into account the across/down repeat directions except in the case of matrix.

  • Is there any way to export 2.35 Anamorphic source to a 16x9 letterboxed frame WITH timecode or text overlays?

    I have been trying to export temp cuts of an anamorphic project (2.35:1) in a letterboxed 16:9 frame with timecode and text overlays and other Additional Video Effects. Converting the 2.35 to 16x9 has been a breeze with the Preserve Aspect Ratio option in Cropping & Padding . The problem is that the black bars that that puts in the 16:9 frame appear OVER any of the Additional Video Effects, thus covering them up.
    E.g. if I select a Text Overlay and place it in the Center, I can see it just fine. But if I want it Upper Left, Title Safe, it is covered by the black space of the Letterboxing. So the Additional Video Effects are getting added, they are just getting covered by the letterboxing. You can even see the very edge of the text in the Title Safe position, peeking out from behind the letterboxing, which is, of course, frustrating .
    Thus far it's been a two-step process: letterbox the anamorphic source, then add TC and other video effects in a second job.
    So - is there any way to do this in ONE step? It would really help my anamorphic workflow.
    (apologies for the lengthy question.)
    [I'm using FCPX 10.1.3 & Compressor 4.1.3, in OSX 10.9.5 on Retina MBP, Late 2013, w/  NVIDIA GeForce GT 750M 2048 MB]

    Thanks for the reply Russ.
    Yes, I've considered adding titles and/or generators in the FCPX storyline, but this creates a need to render the entire timeline. As I'm juggling library locations and hard drive spaces I just didn't want to add a new render that will occupy a lot of space. It's also a bit of visual clultter for me, so my goal is to find the best workflow for adding this stuff on or after export.

  • How to determine column inches in a text frame with intersecting frames?

    I am trying to write a script to determine how much text would fit in a text frame before actually having the text. If the frame has no run-around areas intruding on the frame it is the simple depth of the frame. Is there an easy way to determine the area of the frame with the obstructed areas subtracted?

    Maybe you could fill text frame with placeholder text:
    myTextFrame.contents = TextFrameContents.placeholderText;
    Hope that helps.
    tomaxxi
    http://indisnip.wordpress.com/

  • How do I turn off preview of hidden areas when dragging an image in frame with Direct Select Tool?

    CS5, Not sure how to word this...
    In previous version of ID, if I had a graphic in a frame, I could drag the image around inside that frame with the Direct Selection Tool.  I can still do this with CS5 but it seems to want to show the entire image in a ghosting way that is outside of the frame.  Is there a way to turn this preview type look off like it was in previous versions?  I feel like its slowing my computer down bigtime because I am dealing with a large image.  Everytime I click to drag it, everything slows to a crawl and unusable.

    Go to the Prefernces and set Live Screen Drawing to Delayed.

  • Problems with a JTable

    Hello folks,
    i got two problems with a JTable.
    1. how do I change the size of a table header???
    2. I know that it is possible to set different column-sizes. The problem in my table is that I don't know how long some cells are. In this case, I want to to get the biggest cell of one column and set its size as the default size of that specific column.
    Is that possilbe?
    Hopefully you can help me out,
    thank you

    A JTableHeader is just another Component, so you ought to be able to set its size like you would
    any other component; however, since its function is to act as a header for a table, it might constrain
    itself to fit the table.
    In order to size the column to fit the largest cell, for each row, go through each column and get the
    renderer component for that column (which configures the component for rendering) and get the width
    of that component. If that's bigger than the column's current width, set its width and preferred width.
    You'll also want to check the renderer component width for the header to make sure the header doesn't
    get truncated if the column doesn't have a cell whose value is longer than the header.
    : jay

  • So simple, yet so annoying: problem resizing anchored frame with grab bars

    Asked a question yesterday on how to 'snug' an anchored frame to an image. Got the answer and it works great (Esc-m-p)
    Now... the reason I needed to do this is that when I try to resize a frame with the grab bars, it 'jerks' as I move vertically or horizontally.
    What that means is...
    With borders on, the frame border is a dotted line.
    If I grab the left side of a frame and move my mouse to the right to make the frame smaller, the border doesn't move smoothly -- it jumps a distance of about 1.5 of those dotted lines. Thus I can't always make the frame fit nicely.
    Talked to another Frame user and she said that her's drags smoothly.
    So... am I missing a setting somewhere? Any thoughts would be greatly appreciated.

    ##&*!
    I was working over a VPN when I first experienced the problem... everything was slower than molasses. Set Snap off, did some other work, Frame crashed.
    Setting didn't persist, but everything had taken so long I forgot to check it.
    Gah. Yes, Snap off works wonders when it's *actually* off.

  • Frames with link to Struts do not render before mouse over in IE 7.0?

    Hi
    We have troubles with frames with link to Struts, which do not render before mouse over in IE 7.0? The application works fine with Firefox 2.0 and Internet Explorer 6.0, we have analyzed the cause to be whenever
    you refer to a struts 1.0 action in your frames, you'll see the frames underneath.
    Does anyone have a solution to this?
    <frameset cols="168,*" border="0">
      <frameset rows="76,*" border="0">
        <frame name="cornerFrame" src="/gws/html/logo.htm" scrolling="NO" noresize frameborder="0">
        <frame name="menuFrame" src="/gws/html/menulogind.htm" noresize frameborder="0">
      </frameset>
      <frameset rows="76,*" border="0">
        <frame name="topFrame" src="/gws/html/overskrift.htm" noresize frameborder="0" >
        <frame name="mainFrame" src="/gws/logonstart.do?msg=null&navn=null" noresize frameborder="0">
      </frameset>
    </frameset>
    <noframes>
    <body>
    </body>
    </noframes>When you open the application, the frame is blank, the pages render only when you move the mouse inside the mainFrame area!
    This is a very odd behavior.
    Lars W
    Enviroment:
    Windows 2003 Server
    Sun Java System Application Server 7 2004Q2UR2
    Struts 1.0

    I am having similar problems with shockwave and ie7 crashing.
    This is always preceded by loss of sound.
    Could this article have any significance to this issue :
    Is it possible that the Cumulative Security Update for
    Internet Explorer
    (931768) is causing Internet Explorer to crash ??
    I refer to this article
    Known issues with this security update
    • Controls that prompt before they are loaded
    Note This issue occurs on Web sites that do not use the
    recommended
    techniques. This issue is resolved by using the techniques
    that are described
    on the following Microsoft Web site:
    http://msdn.microsoft.com/ieupdate
    http://msdn.microsoft.com/ieupdate)
    When certain controls are loaded on a Web page, the controls
    are not
    correctly masked by the functionality of this update. These
    controls include
    controls that are used in Macromedia Shockwave Director, in
    QuickTime Player,
    and in Virtools Web Player. When Windows determines that a
    control is
    inactive, the system prompts the user before the control is
    loaded.
    CAN MICROSOFT HELP ON THIS ONE ?? Very frustrating when ie7
    crashes and
    restarts in the middle of a game of golf played against
    others on the
    internet especially when you winning !!
    The game is at this address :
    http://www.nabiscoworld.com/Games/game_large.aspx?gameid=10028

  • Putting frame with buttons into a thread

    please help!!!
    i've got a thread:
    package aJile;
    import java.io.*;
    import java.net.*;
    public class SocketHandler extends Thread
      private Socket socket;               // Socket used for messages 
      private int socketNr;
      private byte[] inbuf;
      private InputStream in;
      private OutputStream out;
      public SocketHandler(Socket socket)
        this.socket = socket; 
      public void send(String str) throws IOException {
           out.write(str.getBytes(), 0, str.length());
           out.flush();              
      public String receive() throws IOException {
           int numBytes = in.read(inbuf);
          String str = new String(inbuf, 0, numBytes);
          return str;
      public String switchOn() throws IOException {
           send("1");
           String state = receive();
           return state;
      public void run()
        try {
          // set up the input and output streams
          in  = socket.getInputStream();
          out = socket.getOutputStream();
          inbuf = new byte[128];
          receive();
         // System.out.println(switchOn());     
          in.close();
          out.close();
          socket.close();
          System.out.println("closing");
        catch (Exception e)
          System.out.println("Caught exception "+ e);
    }and i want to add a frame with buttons to this thread. that everytime tread starts, this frame would appear. and that methods of the thread would be called with a button press. How to join them?
    here is a frame:
    package buttons;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class Frame3 extends JFrame implements ActionListener
         JPanel pane = new JPanel(); 
         Icon lightIcon = new ImageIcon("light.gif");
         Icon darkIcon = new ImageIcon("dark.gif");
         JButton pressme = new JButton("Press Me");
         JButton ironButton = new JButton("Iron",lightIcon);
         JButton lampButton = new JButton("Lamp",lightIcon);
         JButton ovenButton = new JButton("Oven",lightIcon);
         public Frame3()  
              super("Event Handler Demo"); setBounds(100,100,300,200);
              setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              Container con = this.getContentPane(); // inherit main frame
              con.add(pane);
              pressme.setMnemonic('P');
              pressme.addActionListener(this);   // register button listener
              ironButton.addActionListener(this);
              lampButton.addActionListener(this);
              ovenButton.addActionListener(this);
              pane.add(ironButton);
              pane.add(lampButton);
              pane.add(ovenButton);
              pane.add(pressme);
      public void actionPerformed(ActionEvent event)
        Object source = event.getSource();
        if (source == pressme){     
          JOptionPane.showMessageDialog(null,"Hello!","Message Dialog",
          JOptionPane.PLAIN_MESSAGE);
        if (source == ironButton){
             if (ironButton.getIcon() == lightIcon){
                  ironButton.setIcon(darkIcon);               
             else ironButton.setIcon(lightIcon);
        if (source == lampButton){
             if (lampButton.getIcon() == lightIcon)
                  lampButton.setIcon(darkIcon);
             else lampButton.setIcon(lightIcon);
        if (source == ovenButton){
             if (ovenButton.getIcon() == lightIcon)
                  ovenButton.setIcon(darkIcon);
             else ovenButton.setIcon(lightIcon);
      public static void main(String[] args){
           Frame3 app = new Frame3();
           app.setVisible(true);
    }thank you

    could you tell me how to avoid exceptions?
    what i want to to is to call a method wich simply sends a string and gets a string back.
    public String switchOn() throws IOException {
           send("1");
           String state = receive();
           return state;
      }but when i call this method in actionPerformed() i get exceptios and my socket closes. It sends the string though, but after this program crashes. is there anything special to do if i want to use this Frame3 in order to communicate with a client by pressing buttons?

  • I have a problem with my iphoto, al the pictures show up as a gray frame with only the

    Working with import of photos to my iphotos all the photos turned into a gray frame with
    only the photo # displayed ?
    where did I go wrong

    what were you doing? (what is working with import of photos mean)  what exactly do you see? An ! 
    LN

  • Blur video frame with NI PCI-1411 and JAI CV M-300 camera (urgent problem)

    Hello,
    I am new with Vision and I need some advice with a problem, which I encountered.
    I have a computer with integrated  NI PCI-1411 board, which is connected to a JAI CV M-300 camera. I am measuring a steel part which is positioned in a dark chamber. The part is put on a glass board and is illuminated from underneath with light.
    The part is moving. I have to measure this part when it reaches the camera region. I have made a test with not-moving part and everything is perfect. Now, when I move the part I get blur frames from video (with these no part measurement is possible). I need specify, that the camera has no trigger, so it makes video all the time (this video is later inspecting with Vision Builder).
    I have tried to change parameters in MAX, but no involvement. I have found no proper icd/file for the camera.
    I also could use a SONY DXC-950P camera, if this is better.
    How can I eliminate the blur from video frames? Or what am I doing wrong? Is the camera not good enough? Camera + trigger would get better images.
    I have attached the video frame with moving object (static) and the blur video frame with moving object (dynamic).
    Please give me a answer or ideas as soon as possible.
    Thanks.
    Attachments:
    static.jpg ‏391 KB
    dinamic.jpg ‏421 KB

    You are using an interlaced camera.  It takes half the picture (every other line), waits a split second, then takes the other half of the picture (the other lines).  When it puts the two images together, you can see the two positions it was in when the images were taken.
    The best solution is to use a non-interlaced or progressive scan camera, which takes the entire image at one time.  The Sony might be this type of camera, since it has a P in its name.  I didn't look up the specs.
    If you can't get the right kind of camera, your only other option is to use fields instead of frames.  One field is the half image taken at one time.  The image will be half the height of the original image, though, which can mess things up.
    Another possibility is the reduce the resolution of the image.  If you take every other pixel in both directions, you will have a very clear image that is half the size of the original.  You can do this with Extract in LabVIEW, not sure if it is available in VBAI.
    Bruce
    Bruce Ammons
    Ammons Engineering

  • How Can i use Html frames with  simple JSP???

    How Can i use Html frames with simple JSP???
    Actually i am creating an application in which i have used Index.html as frame.
    Noew i am trying that if i click on a link of one frame(say menu frame) the \result shoul come to some other frame(say frame named mainwindow).
    Hoe can i do like this???
    Anand Pritam

    Well i am using..
    < Base target="mainwindow">
    But it is no working is there some other way??

  • Best way to create frame with stroke around a paragraph?

    What is the best way to create a frame with a stroke around text? I
    always thought it was with an inline frame, but now I see that trying to
    put the cursor in the text is very difficult because the frame blocks
    the cursor. Is there a better way?

    Thanks guys.
    What I was doing was putting the anchored frame in an empty paragraph
    above the paragraph that needed the box. The problem was when I tried to
    put the cursor in the text the anchored frame blocked it. Why is an
    anchored frame on top of text?
    The easy solution would be to cut/paste the text into the anchored frame
    (which would be similar to Ole's single cell table idea). I didn't want
    to go this route for two reasons:
    1) I don't want to cut and paste every paragraph.
    2) I didn't want the story to be broken up. I wanted it to be one long
    flow of text. It makes tings easier just in case the paragraphs have to
    break across two pages.
    Jongware's underline/strikethrough idea is another good one, but I don't
    like the idea of putting in all those extra characters.
    What I ended up doing was using paragraph rules. I set the rule above to
    1pt larger on all sides than the rule below so it looked like a box with
    a stroke. Of course, the problem with paragraph rules is getting it the
    right size. I wrote a script that calculates the size of the text and
    sets the rule size the correct amount.
    Of course this still has its problems when the boxes need to break pages...

  • Frame in frame with graphics problem-or maybe not

    Hi from Croatia.
    Well I have and extremely demanding costumer that wants to control every single bit of the project.
    The problem is as follows.
    I have a book that every once in a wile has annotation which above and bellow has a graphic line (not simple line but complex graphic imported from illustrator.)
    I tried to anchor one object above and another bellow this text which lets say stands in the middle of text frame and for me everything works ok.
    But this demanding customer wants that those annotations are in separate frame so that he can have full control over them(?).
    So I made frame in frame-put wrapping around this smaller frame.
    The problem is- is it possible to put those graphics in this smaller frame, create text object and add it to library so that i can use it multiple times. I have more than hundred of those annotations.
    And is it possible when i cut the text from this main frame to paste it in this smaller one and that this small frame automatically fills with text so that frame expands vertically according with amount of text. I am not placing text but pasting. I hope you have understood but in every case here is an example.
    Main text frame(text fills full width of page)
    sadbhjasdsdab
    sagsafgsfgafsd
    agsfgfasg
    (Now smaller frame with graphic fills full width of main frame)
    ewfewtf
    agasg
    sdagasdga
    (text fom main frame continues)
    fasdfs
    dsgasgasg
    dfgdfsg
    dfsgsd
    Uf this was exhausting even for me.
    THX for any help.

    I tried to use 3 row table with header and footer, but the problem is that indesign does not allow tables to break when the part of table goes to another page.
    And THX for in for on those plugins.

  • How to act a form like a frame with scrollbars?

    How can i setup a form like a frame?
    I got a long list of input fields in my form which doesn't fit on a page.
    So i was thinking of creating a form that has frame with scrollbar function, like the iframe in HTML.
    Is there any way to do this??

    Not sure I understand what you want, but I set up a page with 2 items on one row, 3 on the next. http://apex.oracle.com/pls/apex/f?p=23834:30 is that the sorta thing you want to do? - control where the items appear?
    If so - you can just use drag and drop layout, or on the items settings (Displayed settings), specify whether or not it appears on a new line or not.
    Ta,
    Trent

Maybe you are looking for

  • HTTP_REFERER header is missing in request for .mp4 from Safari on ipad or iphone

    I just discovered that when I have a .mp4 file embedded in my webpage and I visit that page using Safari on the iPad, the request for the .mp4 is missing the referer header.  This is a problem for me because I use URL Rewriting in my web.config file

  • Drop Ship workflow Process Name

    Hello, Does anyone know the seeded Process Name that could be used for drop ship orders. According to the documentation I've read about drop ship, they explained to use the Generic Order Flow which I did. The problem is with the line level process na

  • Theme setting while portal integration

    Hi, I have developed one ABAP web dynpro application, I have integrated it to the portal in relevent sub-area, The portal theme is pink background but my application is developed in standard color that is blue. How to change the theme of my applicati

  • Credit to vendor while creating SC

    Hi All, Is there a way to apply a credit from a vendor to a shopping cart at shopping cart creation time versus applying the credit at purchase order creation time? Thanks, Ravi

  • Where do I get the 11.1 version of Itunes for my ipad?

    I plug in my ipad to my computer in itunes. A window comes up that says The ipad cannot be used because it requires iTunes version 11.1 or later. When I look at updates, there is no version available. What do you recommend?  Is this available? Is it