Override the ToolTipText of the JTable with JButton ToolTipTex(pls see msg)

Hi All,
Could you please me to solve this problem?
I have two Icons display on 2 JButtons (2 different ToolTipText for buttons). The Buttons are display on a JPanel. The Panel is display on one of the cell inside JTable. Is it possible that when I move the mouse over each Icon it will displays the ToolTipText of each of the JButton (I am try to replace the ToolTipText of the JTable with the ToolTipText of the JButton when mouse over and when I move the mouse to the next JButton I get a different ToolTipText). The reason I am using the JButton is that in the future I will add actionListener() to do something when the user click on it.
I have try working with glassPane, addMouseMotionListener, MouseEvent.getPoint(), SwingUtilities.convertPoint, SwingUtilities.getDeepestComponentAt.
Thank you in advance.
Note: I am getting the Icons from Object [].

Hello, the following is one ugly piece of code but I guess that's pretty much what you were after. Just test the tooltip and you'll see that it depends both on the cell and on which of the two buttons is hovered.import javax.swing.*;
import javax.swing.table.TableCellRenderer;
import java.awt.*;
import java.awt.event.MouseEvent;
public class TestTooltipTable {
     private static class CustomTableCellRenderer implements TableCellRenderer {
          private JButton theLeftButton;
          private JButton theRightButton;
          private JPanel thePanel;
          public CustomTableCellRenderer() {
               theLeftButton = new JButton("left action");
               theRightButton = new JButton("right action");
               thePanel = new JPanel(new GridLayout(1, 2)) {
                    public String getToolTipText(MouseEvent e) {
                         Point p = e.getPoint();
                         Rectangle leftRect = theLeftButton.getBounds();
                         Rectangle rightRect = theRightButton.getBounds();
                         if (leftRect.contains(p)) {
                              return theLeftButton.getToolTipText();
                         } else if (rightRect.contains(p)) {
                              return theRightButton.getToolTipText();
                         return " ";
               thePanel.add(theLeftButton);
               thePanel.add(theRightButton);
          public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected,
                                                                    boolean hasFocus, int row, int column) {
               String text = (String)value;
               theLeftButton.setToolTipText("left action " + text);
               theRightButton.setToolTipText("right action " + text);
               return thePanel;
     public static void main(String[] args) {
          final JFrame frame = new JFrame(TestTooltipTable.class.getName());
          frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          Object[][] data = {{"1", "A"}, {"2", "B"}, {"3", "C"}};
          String[] columnNames = {"Number", "Letter"};
          JTable table = new JTable(data, columnNames) {
               public String getToolTipText(MouseEvent event) {
                    return super.getToolTipText(event);
          table.setDefaultRenderer(Object.class, new CustomTableCellRenderer());
          ToolTipManager.sharedInstance().registerComponent(table);
          frame.getContentPane().add(new JScrollPane(table));
          SwingUtilities.invokeLater(new Runnable() {
               public void run() {
                    frame.pack();
                    frame.show();
}

Similar Messages

  • JTable with JButton Cell renderer

    How can I get buttons (JButtons) to "depress" properly in a JTable when using them as the cell renderer for a specific column in a JTable? Currently when pressing any button in the column, there is no change in the visible state of the button, i.e. it doesn't change color to create impression of depression.

    Is the [problem not the fact that the JTable cell renderers merely rubberstamp each cell with the appropriate display, i.e. the actual component in the cell is not an actual button (just looks like one)? If this is the case, then the same problem will persis with a JToggleButton as well won't it?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • The Problems With Logic (as I see them) - PART TWO!

    Hello again,
    It seems to be a tradition now that as I compose on a track, I keep a text editor open so that I can jot down all the annoyances and problems that I encounter during my creative process... Anyone who missed the previous edition of this topic, please visit PART ONE, here:
    http://discussions.apple.com/message.jspa?messageID=3605456#3605456
    That said, here I give you "The Problems With Logic Part II":
    1. Logic should clear the playback buffer everytime you play. Quite often you start playing and there is trailing reverb/note events from various audio instruments and plug-ins.
    2. The sample edtor "save selection as" has no memory of where you previously were in the file browser.
    3. If you double click on a wave form, the sample editor opens up with the wave form you double clicked on... Great.. But now, if you go and double click on another wave form somewhere, it just takes you back to the sample editor with the same previous wave form selected (not great). This is incredibly annoying if you are attempting to save out certain edits-- Quite often you will end up saving 5 or 6 of the same exact waveform, thinking you were saving each individual one. GRR!
    4. Key commands.. if you try to assign a key command to something that is already used by another feature, you are presented with a window warning you that it already exists.. If you click cancel, then you can no longer enter any keys in the key field.. You are forced to close the key commands preferences window and start over.
    5. Key command window: You should be able to search by command.. For example, if I want to find out what "o" is assigned to, I should be able to search by O-- Further, you should be able to sort the key commands by clicking the column titles "key", "command" -- or "midi"... After all, we can sort by name, date, size, etc in the finder by clicking on these column titles.
    6. Tempo Tap feature-- I am quite confused by this. There should be a simple way to tap and define a tempo. When ever i try to do this, the tempo is only temporarily changed until I stop playing, and most of the time I get error alerts about trying to sync audio and midi (mind you, when there are absolutely no parts in the entire arrange window). The manual states that with "tempo recording" checked on the tempo interpreter window, that the taps will record tempo changes, but this does not work. I tried doing this, tapping the key command I defined to tempo tap (ctrl-shift-t), and I was tapping at various speeds-- many taps fast.. and Logic recorded tempos of 99-101bpm.. I was tapping atleast around 175-180bpm. I then tried tapping slowing, and Logic recorded tempos of 99-101 again... so this feature obviously is full of bugs.
    7. When loading songs, as soon as various plugins such as Kontakt, exs24 begin loading samples, it brings logic to the front. If you're working in the background in other applications while waiting for your songs to load, you are rudely interrupted from what you're doing (such as, selecting from a menu, typing a document, etc) only to be forced to watch a status bar fill up.. and then all key presses at that point become error beeps.
    8. Logic's sample memory easily becomes messed up and crazy. Quite often when using AU instruments such as BFD, Culture, and even Synthogy's Ivory. I will switch to that particular track to play on my keyboard, and each sample will be full of horrible pops and clicks-- the kind that destroy speakers. Other times, in a sample of a string for instance, all of a sudden after one second will be a pop and then the sample will be playing at a completely different pitch... I have to remove the AU instrument and reload it at this point.. This happens quite often. Logic should offer a 'buffer reset' so that you can just flash plugins but they reload whatever preset they were set to.
    9. Volume faders resolution are lame! There is no reason why you shouldnt be able to access +1.0, +1.1, +1.2, +1.3, +1.4, +1.5, +1.6, +1.7, +1.8, +1.9... Further the display is only so wide and you can't even read the decimal values for numbers -10 and lower. They just appear as 10.
    10. When a movie is open, and you are viewing the video output via FIREWIRE, there is a mini-floating window which contains the smpte, position, and movie start information-- However you cannot modify any of these values. You have to switch video output back to "WINDOW" to change the start position of the movie. This is obviously a bug.
    11. Changing the movie's start time is very user unfriendly. There should be a simple way to specify to start at a moment of time relative to SMPTE-- So you can just say "+9:15" for example, and it would take you in 9 minutes and 15 seconds, rather than how it is now where you have to think backwards from SMPTE code and subtract.
    12. You cannot view video as a window AND output to firewire. There is no reason why you shouldn't be able to do this. For example, if I wanted to output my video to a monitor in a vocal booth-- I can do this.. but I can't see what the vocalist is seeing on my own screen! This is just nonsense. You should be able to output to the screen (desktop mode or floating window) as well as an external firewire device.
    13. Saving a song with a movie open should mean that when you load that song, the movie should be up and exactly as it was prior to saving. As it is now you have to select "open movie again".
    14. There is still definitely a bug in track automation-- this was really bad back in version 4, but there is still something not quite right here where starting playback will not always guarantee that the automation data is being read.. And in my experiences it results in volumes being incorrect until you stop and play again, and in some cases it will not work at all unless you plot some automation points. This is an intermittent issue-- but quite often activated by placing an audio region from the audio window on a track (SEE VIDEO).
    WATCH VIDEO OF THIS BUG:
    http://collinatorstudios.com/www/logicbugs/logicautomationbug.mov
    15. In the arrange window, sometimes when zoomed in tightly, all parts on a track are selected, and you think that only the part that you are looking at is selected.. you move this part, and now all of your parts are off. Logic should have some kind of visual aid to let you know when ever you are moving multiple selections... Something like, the parts you are moving will highlight a dfferent color or something... This is a similar problem I have with the loop area of the screen.. You can accidentally turn it on when in the matrix window, and have no idea unless you look down at the transport, but with me for example, my transport is at the very bottom of the screen and I am not looking there most of the time.
    16. Automation data, when two points are semi-close to each other, suddenly the value of the data is no longer shown.. I can understand that when you are zoomed out, and there is simply no space for this to visually appear, that's appropriate. But as it is now, it doesn't display this information when there is plenty of space for it to be visible.
    17. Logic should let you set audio track inputs to the various outputs (1-2, 3-4, etc) and buses.
    18. clicking on a track selects ALL parts. This is so so so annoying. How many times have I been editing voice over, and selecting a track, thinking I am shrinking the length of a part, and to find that ALL parts have been shrunk.. SO ANNOYING!!!! This needs to not happen, and there should be a simple way to right-click a track and it will have an option "select all regions"... also, when you click on a track and all parts are selected, if you horizontally zoom, logic zooms into the beginning of the track, rather than the song locator. I don't know what the LOGIC behind this is, but it's not very helpful, it actually is very frustrating.. Zooming should always move towards the song locator position.
    19. EXS 24 should have a "reverse/backwards" button so that samples played are backwards.
    20. Logic should offer a way to globally increase or decrease a specific automation type (especially volume) globally for all tracks... So if you have detailed crescendos that start at -3.8 and end at +1.6, you can add 3db to this and it will now be at 0.8 and end at 4.6.
    21. If you have multiple tracks of the same track (such as three Audio track #1's)-- say you are recording guitar parts, and just copying the track and muting the previous track as a method of maintaining multiple takes for later auditioning. If you draw automation volume data on this track (it appears on all 3 tracks), and then if you delete the audio from one of the muted tracks and tell logic to KEEP it, suddenly all automation data is gone. GRR!!!
    22. Several times I have opened Kontakt, and attempted to load an instrument while outputting a movie via firewire video to my monitor. As soon as I try to load the instrument, the firewire video output on my monitor goes crazy, and then comes back on.. Logic then crashes. This has happened 3 times randomly...
    23. UNDO does not work on every function. for example, if you change an output to bus 1 instead of 1-2, you cannot undo this. Undo should undo whatever the last command was, no matter what it was. This is what the word LOGICal is supposed to represent.
    24. Floating windows (as in plugin windows) should close with apple-w!!!
    25. *BUG* If you are in a part that is say 10 measures long, zoom in horizontally 100% in the matrix window-- You then isolate one specific quarter note pitch in the middle of this measure, and have cycle turned on, looping over this one quarter note, if you are not looking at this note event/loop region when you hit play, the display will jump to the beginning of the part and never show you this note event as it loops. However if you have the note event on screen when you hit play, then it will behave properly. This makes it extremely difficult and frustrating to perform detailed hyper-draw work. (SEE VIDEO)
    WATCH VIDEO OF THIS BUG:
    http://collinatorstudios.com/www/logicbugs/logicloopbug.mov
    26. *BUG* Host Automation is not accurate. I assigned Kontakt's tune knob to C#000, and If I place a dip, the knob begins to move way before the automation data is even present.... So basically what I was trying to do, can't even be accomplished because Logic screws everything up by pitching the instrument too early... Such a shame.. By the way, I previously mentioned the importance of being able to display part data in the arrange window as matrix data (horizontal lines) rather than score data. Someone argued what good this would do-- Well this is a perfect example, if I am attempting to affect a particular section of a note with automation, I can't possible visually see where this is because the length is not described by the current score representation. Having a horizontal representation would solve this problem... (SEE VIDEO)
    WATCH VIDEO OF THIS BUG:
    http://collinatorstudios.com/www/logicbugs/logicctrlchngbug.mov
    27. There should be a way to convert stereo samples to mono in the sample editor.
    28. When you view "as text" in the environmentt, you cannot drag an object to the arrange window-- Such as to create a bus track.. Now mind you I don't know why you can't just select "BUS" when editing a track in the arrange window in the first place, however there is no reason why 'view as text' should behave differently than when it's viewed as icons.
    29. When you drag a bus from the environment to the arrange window, it replaces whatever track was there. It should ADD a track instead of replace-- atleast there should be a preference for how this behaves.
    30. Occasionally when dragging a bus from the environment, there is some visual garbage in the track automation (see screenshot).
    31. There should be a way to LOAD and SAVE selections in the arrange window. Quite often when editing audio from a countless number of parts/regions, it becomes painful when you have to select and move 100s of audio files. There should be a way that you can just select a ton of regions and save that selection, and reload it at anytime. There are a few 'select' tools/options under the edit window, however they are song specific-- not track specific. So they are completely usesless for what I need.
    32. Logic should offer a feature to collect sysex data from midi devices so that patch names show up and can be selected via program change.
    33. When no track or part is selected, and you vertically zoom in, Logic should zoom into the center most track.. It behaves very oddly and zooms in more towards the top. This becomes extremely annoying when dealing with a sequence involving 100 tracks, and a part is selected but you scroll far below where the part is.. When you begin to zoom in, it takes you towards the selected part, yet it's not displayed on the screen and you have no reference for what you are even looking at. The rule should be this: If the part is on the screen, zooming vertically will bring you to it. If it's off the screen, you will zoom into the center track of whatever is currently on the screen.
    34. I mentioned this in a thread earlier... http://discussions.apple.com/thread.jspa?threadID=752485&tstart=0
    There is a bug when using the transform tool involving the 'position' variable. In my example, I was attempting to reverse the time placement of three chords, that occured in a part somewhere in the middle of my song. By selecting the measure start and end of this part, Logic was unable to select or operate with the transform tool (and I tried a variety of transform options). If I moved this part to the beginning of the song, then the transform tool would suddenly work. After some research, I found online someone had said "Position Time position of the event, referenced to the start of the MIDI Region (not of the song)."--- But if I still doubt this is true, because I then placed the part on a new track with no other data, and placed it in the middle of the sequence and in the transform tool under position I selected '1 1 1 1' to '5 5 5 5' as well i tried setting the position to 'all', and none of this worked. This obviously is a bug... If it's not then it's a very serious design flaw. The position should relate to measure numbers of a song, and nothing else.
    WATCH VIDEO OF THIS BUG:
    http://collinatorstudios.com/video/transform.mov
    That is all for now...
    For those who firmly agree with me and all of the points that I have brought up now and in the past, I encourage you to contact Peggie Louie, (the Logic HR department contact) at (408) 996-1010 and suggest that she hire me as a consultant to help eliminate Logic's many annoyances. I have tried to pursue this heavily in the past, but sadly I was completely ignored by her on all levels. Maybe you all can help make a difference?
    Fighting the good fight,
    Patrick J. Collins
    http://collinatorstudios.com

    11. Changing the movie's start time is very user
    unfriendly. There should be a simple way to specify
    to start at a moment of time relative to SMPTE-- So
    you can just say "+9:15" for example, and it would
    take you in 9 minutes and 15 seconds, rather than how
    it is now where you have to think backwards from
    SMPTE code and subtract.
    For this one I'd suggest getting SMPTE calculator. Entering timecode numbers and having to add and subtract is not so difficult, and AFAIC part of a composer's gig. But what I would add, instead, is that it would be fantastic if Logic provided a timecode calculator (edit: even if it was in the form of a custom Logic widget).
    13. Saving a song with a movie open should mean that
    when you load that song, the movie should be up and
    exactly as it was prior to saving. As it is now you
    have to select "open movie again".
    This doesn't always happen. I've struggled with this for a long time, and I don't know why sometimes the movie will load and not other times. I would also add here that Logic should show the file pathname to the movie. Somewhere...
    18. clicking on a track selects ALL parts. This is
    so so so annoying.
    You can prevent this from happening if you have cycle turned on and set to a set of locators that "contain" the parts you might want to select en masse. I always work with cycle=on so this is not a problem.
    21. If you have multiple tracks of the same track
    (such as three Audio track #1's)-- say you are
    recording guitar parts, and just copying the track
    and muting the previous track as a method of
    maintaining multiple takes for later auditioning. If
    you draw automation volume data on this track (it
    appears on all 3 tracks), and then if you delete the
    audio from one of the muted tracks and tell logic to
    KEEP it, suddenly all automation data is gone.
    GRR!!!
    Never had that happen. In my experience, telling Logic to keep the data always works.
    23. UNDO does not work on every function. for
    example, if you change an output to bus 1 instead of
    1-2, you cannot undo this. Undo should undo whatever
    the last command was, no matter what it was. This is
    what the word LOGICal is supposed to represent.
    Undo in Logic is highly problematic for other reasons. Here, I think there should be a specific Environment Undo, just like there's a separate undo for audio edits.
    29. When you drag a bus from the environment to the
    arrange window, it replaces whatever track was there.
    It should ADD a track instead of replace-- atleast
    there should be a preference for how this behaves.
    Right. This is a matter of personal preference. But still there are other ways to get an object assigned to a track. The "thru tool", for instance. No dragging required.
    32. Logic should offer a feature to collect sysex
    data from midi devices so that patch names show up
    and can be selected via program change.
    My guess: considering how much sheer time it takes to write this kind of software, let alone debug it with every conceivable device, it's not likely this is going to happen.
    That is all for now...
    For those who firmly agree with me and all of the
    points that I have brought up now and in the past, I
    encourage you to contact Peggie Louie, (the Logic HR
    department contact) at (408) 996-1010 and suggest
    that she hire me as a consultant to help eliminate
    Logic's many annoyances. I have tried to pursue this
    heavily in the past, but sadly I was completely
    ignored by her on all levels. Maybe you all can help
    make a difference?
    Wait in line buddy!
    (LOL)
    I must say, I'm very impressed with your list and attention to detail. And I feel your pain, trust me. But many of the things you've listed are feature requests and not bugs. And some of the behaviors you've described I have yet to run across. So this is typical with Logic, that it can be operated in so many diverse ways that no two people run it in the same way, nor would two people conceive the program's capabilities in the same way. But I digress...
    I also think there's a certain amount of Logic convention that I don't think you've adopted yet, hence your wish for behaviors that don't yet exist.
    I don't disagree with most of your feature requests, and I'm (quite unfortunately) able to say that I'm familiar with most of these bugs and about 9 dozen more. But again, it's important to distinguish between bug, feature request, time to RTFM, and errant behavior that's experienced by a very limited number of users.
    There's no doubt that this program has its problems. In particular, your #1 re the playback buffer. And I'm glad you've brought many of the bugs into the light for people to read. Good work.

  • The problems with Logic (as I see them)

    Hello Everyone,
    Please keep in mind that I am writing this with the intention of expressing my frustrations, and what I feel would make Logic a better program. I realize not everyone will agree with the importance of what I say, but I am a firm believer of HAVING THE OPTIONS. Let the users choose what works for them and how they can best accomplish the tasks that they need to with their individual workflow.
    That being said, here is my list of Logic's faults and why I often call Logic "Illogic".
    General:
    * Logic should have a feature to automatically save your song every X number of minutes. Final Cut Pro does this, why doesn't Logic? It should prompt you "Logic can automatically save your project if you save it" (assuming the current file is 'autoload') to remind users that they should create a project name and save their work.
    * There should be a preference option for all windows to open as 'float'. Once upon a time holding option while double clicking parts would open them as a float (though having to hold down option every time in my opinion is an inconvenience, because I personally ALWAYS want my windows open as a float), however.. now in 7.2 that does not seem to work anymore. So, theoretically after you set your prefence to 'always float', then the when you hold option or control and click on a particular window, it will bring that window to the foreground...
    * The loop region at the top of the screen is larger than the time-line ruler tab. This is the #1 annoying thing about logic. so many times, I click on an area of the ruler tab to start playing at a specific section.. and somehow I ACCIDENTALLY click on the loop area... If I could ask for ANYTHING it would be that there is an option to disable LOOPING turning on and off from clicking up there. My 2nd request would be that the ruler tab be re-sizeable so that it can be larger than the loop area. This is especially the case for the matrix window where it default opens up to a sizing where the actual time line is so tiny, and the loop region is HUGE.... Every time I open a matrix window I have to resize this and again the loop area is 2x as big as the timeline area, so I end up wasting screen space just to avoid the annoying loop feature being trued on. My suggestion is, require that the loop button on the transport be the only way to turn on the loop feature (other than key commands), and only when it's turned on can loop points to be set. Why is the loop area so big anyway?!?!
    * Logic should offer a TALK BACK MIC button which will utilize the built-in apple microphone or iSight microphone and allow that to be sent to the audio interface. This would be an extremely useful feature for studio recording setups.
    * Starting logic takes approximately 5 minutes for me. It says "scanning exs24 instruments" for the majority of the time, and I admit my sample library is huge. however, my sample library has not changed in over a year. Why does logic have to continuously scan it??? Can it not make a reference of how many files, compare and if its larger-- then scan???
    Song Loading:
    * When audio files are not found during loading a song, it asks you the first time what you want to do "search", "manual", and "skip"... if you click "skip", and then it finds another missing file, it no longer presents you with the "SKIP" option.. but forces you to either search or skip all.. Let's say you have a project that used 5 audio files that are all missing because you had them on a different hard drive, but have copied the data somewhere else. The first two files it asks for you don't need.. but you know where the 3rd file is.. So your plan is to skip the first two files and then click manually for the 3rd.. but oh.. YOU CAN'T DO THAT! You have to find your first 2 files if you want to even have the option to locate your 3rd file... Unless you are planning to locate the files within the audio window-- but still, Logic should not be so unfriendly.
    Further, If you choose "manual", and what you're looking for isn't where you thought it was-- You realize you actually want to search for it.. So you click cancel and guess what.. It assumes you want to skip it, and so you either have to reload your project again, or deal with this in the audio window. Bottom line is this window should always have "Search", "Manual", "Skip", and "Skip All".
    * When you open another project, Logic DUMPS all of the audio instrument data in memory. This is one of the worst things about logic. If you are working between multiple files-- such as when scoring a film, and you are using different files for different cues, then this becomes a complete nightmare and a waste of your time. Logic should be assessing "What instruments are in common between these two projects"... And utilizing all audio instruments to the best of the machine's memory capacity. There is no reason for Logic to behave like this.. I've had to revert back to previous versions of the same song because some data was different, and I am just trying to visually compare various settings one from the other.. Just clicking from one project's window to the other requires me to have to wait 3-4 minutes while Logic loads all these audio instruments (WHICH ARE IDENTICAL IN BOTH PROJECTS BY THE WAY!!!).. This is just incredibly dumb, and creatively stifling.
    * BUG * -- Mind you, if you have two projects open, and you close one.. Logic begins loading all the audio instruments of the remaining project.. If you close that project as it's loading audio instruments, Logic will crash.
    Matrix Stuff:
    * BUG * If you have a part with lots of notes, and you begin to make a selection and scroll horizontally through all the content until then entire part is covered in the selection... After you release the mouse button and make this selection, quite often many random notes are unselected. This can be demonstrated by watching the following quicktime move:
    http://www.collinatorstudios.com/video/logicbug.mov
    * When you select a single note in the matrix window, it sounds.. This is a GREAT feature... However, when you make a selection of multiple of notes, they all sound at the same time.. This is just plain dumb. It once blew up my speakers... There is NO reason why a multiple selection would need to sound.. It's just dumb.. bad for your speakers, bad for your ears. The rule should be, if selection box = yes, then sound = no... else, sound = yes.
    * When viewing the matrix window while recording, all note events disappear until after recording stops. This is highly annoying (and illogical) as it causes confusion if you are relying on watching the note events in that part to know where you are supposed to come in.
    * The grid cannot be set to divisions other than 2 or 3. Musicians use 5 and 7!!! And also, can logic please offer an option to display the grid as NOTE symbols... It is much more musician friendly to see a 16th note with a 3 over it than "24". 24 means nothing to me as a musician.
    * Quantizing should allow custom input for tuplets.. So that users can quantize odd figures such as 13:4 for example.
    * If you move the song locator to a specific time location in the arrange window, and then double click a part to open it in the matrix window, the window is not opened to the locator's position. Thus causing annoyance and confusion as far as what the user is even looking at.
    * During horizontal scrolling of the window, the locator temporarily disappears, making it difficult to find where the locator is-- which usually is a marker for us to know what we are trying to find-- ESPECIALLY WHEN YOU OPEN A WINDOW AND IT'S NOT EVEN DISPLAYING THE SONG LOCATOR'S POSITION!!!
    * If you have two parts on the same arrange track, adjacent to each other and you enter the matrix window of the first part.. (assuming the link/chain icon is lit) When you scroll to the end of the note data, logic automatically takes you to the next part... The problem with this as it is, is that it does not take you to the FIRST note event of the text part, but rather continues to align the song locater with where ever it previously was (so you end up viewing somewhere further down in the next part).. To clarify, say you have a part what begins at MM-7 and ends at MM-14, the 2nd part begins at MM-15 and ends at MM-22.. If you begin scrolling the song locator past measure 15, then suddenly you see measure 22. When you really should be seeing measure 15. This is confusing and weird.
    * Every time you enter the matrix window of a part, the chain/link button is on. For me, this is incredibly annoying. There should be a way to set this so that the button's default is OFF...
    * When you move the mouse around the matrix window, whatever pitch corresponds to the vertical location of the mouse--- that particular key of the piano keyboard on the left side of the window should highlight so you could clearly see what note you are hovering over.. Logic tries to help with this by offering things like contrast options for C D E, but this clearly would be much more helpful.
    * With the velocity tool you can (MOST OFTEN ON ACCIDENT) double click on empty space in the window and cause all note events in all parts to appear on the screen-- Yet once you do this, you can't double click on a particular part's note to only display that part again. You have to switch to the arrow tool to do this. This is inconsistent and ILLOGICAL...
    ON A SIDE NOTE: PLEASE ENABLE A FUNCTION TO DISABLE THIS "ALL NOTES OF ALL PARTS APPEAR" when double clicking on empty space feature! I want NOTHING to happen when I double click within the matrix window... Make it a button within the window or just an option in the drop down menu only. * BY THE WAY * When you DO double click the background of the matrix window and multiple parts appear.. If you move notes of one part to match it up with other, it is incredibly slow. there is a 1-2 second pause each time you move a note move.. My g5 fan goes on each time I do this.. I'm sorry, there shouldn't be anything too CPU intensive to accomplish this simple task!!! I am only viewing 2 parts at the same time and it's slowing down my cpu...
    * Occasionally when I adjust note lengths, I accidentally double click on an actual note.. This opens the event list editor, and there is an intermittent bug where this note sounds-- and for some reason when the event list opens, the note sounds on top of itself a million times, so the result is a super loud flanged note which again, almost blows up my speakers and hurts my ears... PERSONALLY, I would like an option that DISABLES the note event list from opening by double clicking. Preferences currently has "double clicking a midi region opens: <selectable>"--- why not also have "double clicking a NOTE in matrix window does: <selectable>"-- and please allow "DO NOTHING" to be one of the options.
    * Why does the finger tool only change the end position of the note event??? Should this not be replaced with the bracket tool which appears automatically when using the arrow tool on closely zoomed in notes? This finger tool seems like an outdated old logic feature which has been replaced and improved upon. What would be nice is to have this bracket tool where we can be assured we are altering note start and end positions without moving things.
    * In the hyper-draw >> note velocity section--- This is highly annoying to work with... It's far from user friendly. first of all, to move a note's velocity position, you have to click on the "ball".. if you click on the line, it does nothing.. Because the ball is so small to begin with, quite often the user is going to miss the ball and somehow begin to "START LINE"-- Which is weird because it's activated by holding the mouse button down briefly. There really should be a "line tool" for this, because "START LINE" is too easily accidentally activated-- this is frustrating for the user. Most important though, these 'velocity markings' should be adjustable by clicking on the line as well-- not just the ball.. there should be a 2-3% area around each ball/line which logic will recognize as part of the ball/line so that it can easily be moved. I also feel that there should be some specific features for this section, such as a way to select multiple note velocities and apply a random pattern to them, or apply a logarithmic curve to the line tool. Yes, you can accomplish this stuff somewhat with the transform tool-- but this way would be more user friendly, and allow a lot more creative flow.
    Event list/Tempo list:
    * When one event is selected, by moving down X number, holding shift+clicking SHOULD select all events between those two points. However, the shift key for some reason acts as the OPTION key does in the finder-- (meaning it will only add one additional selection at a time).. This is highly inconsistent with the actual behavior of a Mac... Open a finder window and hold shift and click on items that are not vertically next to each other and a group is selected... Now do it in logic, and it causes GREAT frustration and annoyance. What happens if you have a million note events that you want to erase? You have to go page by page and click with shift on each one?? Or drag a selection and wait for logic to scroll you to where you want to go?????????? No thanks.
    Arrange stuff:
    * "REGIONAL CONTENT" (meaning the visual representation of note events) does not accurately depict the event data as note lengths cannot be visually identified. Everything shows up as a generic quarter note... My #1 suggestion is that regional content should be customizable so that you can view it in a miniature matrix data style. The biggest problem for me is that I cannot see where my notes end-- I can only see where they start, this makes it very difficult to identify what I am looking at.
    * Track automation data should only be inputable by the pencil tool. I cannot mention how many times automation data has accidentally altered when using the arrow tool. The pencil tool should allow you to raise and lower the lines reflecting automation data... What is the point using the pencil tool for automation if it's only function is to create "points" yet you can also create points with the arrow tool..??? Pencil tool should act as the arrow tool does in the sense that it raises or lowers automation data.
    * Recording preferences do not offer the option to automatically merge new part with existing part when a region is NOT selected. How annoying is it to have to select a part every time you want to record something just so it will be included in that original part!
    * Ruler at the top of the screen should also give an option for tuplets. 5, 7, etc.
    * When in record mode, if you click on the ruler to another time position, all audio instruments cut out and it takes approximately 3-4 seconds before tracks begin playing audio. This becomes very annoying if you are trying to do a pick up and want to just start 1 measure before hand.
    * There should be a way to EASILY (without having to cable two tracks together in the environment) temporarily link multiple tracks together so that automation data will be duplicated. So theoretically you can link 3-4 tracks together, and by adding automation data to one, you are adding it to all 4.
    * If a part is soloed, and you hit record. The part stops being soloed and you can no longer hear it. This makes it impossible to record a pick up on a soloed track unless it's locked, but it shouldn't need to be locked.
    * When you are zoomed in tightly, and you are trying to align notes within two parts on different tracks (meaning using the PSEUDO NOTATION DATA that appears in the part to align), there needs to be a VERTICAL line that snaps to the note closest to the mouse cursor. When trying to do this in parts that are a far vertical distance apart, it becomes VERY difficult to eye this alignment. Logic does this with automation data.. but for some reason they left it out for actual part alignment...
    * There should be a way to force the downbeat of a measure to occur at any given moment... What I mean by this, is composing for film is an absolute PAIN in Logic. Scenes, last for odd amounts of time, and Logic's reference manual claims that you can solve this by using various tempo tricks, however it is ineffective for the most part. What Logic needs is the ability where you can click on a drop down menu item within the arrange window and FORCE that where ever the song locator is, the rest of the measure is eliminated and a new measure downbeat occurs right there. This will allow you to always have new scenes on the downbeat of a measure without having to mess with your tempo and meter.
    Hyper Edit Window:
    * I can't even begin to comment on this... The hyper edit window is one of the worst things I have ever seen in a music/audio program. It is a horrible interface, you can't get it to do anything correctly without messing everything up. This thing needs a complete overhaul... I mean, just try to create a simple crescendo with note velocity and it will take you all night.. Try to add pitch bend data, and it adds note velocity data as well.. It's a total nightmare, and I would love to hear someone's practical application of this window.
    Score Window:
    * The method that the song position locator moves along with the notation is very strange. It is not at all how a person's eyes function when reading music. A much more logical approach to this would be for a transparent colored block of some type to highlight an entire measure, and each note head will glow as it sounds. The current way is so strange, it speeds up and slows down-- makes absolutely no sense, and it is more disruptive than anything.
    * When the Hyper Draw > note velocity area is exposed, if you use the velocity tool to increase/decrease a particular note's volume, the data in the hyper draw window does not update in real-time as you use the velocity tool. This behavior is inconsistent with the matrix > hyper draw's note velocity section-- where as in that area, the velocity ball/lines do update in realtime.
    EXS24:
    * when you are in many levels of subdirectories and you are auditioning instruments, it becomes very time consuming and annoying to have to continually trace through all the subdirectory paths. There should be a feature directly under the load instrument window that takes you to the subdirectory of the current instrument.
    * Seems when SONG SETTING > MIDI > "chase" is turned on... When starting sequences using audio instruments, (I am using a harp sample within the exs24), there is a latency hiccup upon starting, which is very disruptive when trying to listen to a short isolated moment in a composition. And I do want to chase note events in general-- but this present situation makes it difficult for me to work. I would suggest that you can specify tracks to exclude chasing.. Or fix the latency hiccup issue.
    Thank you.
    -Patrick
    http://collinatorstudios.com

    this is excellent patrick. can you number your points so that the thread can be discussed?
    1. yes
    2. ok
    3. great idea
    4. even better idea. you could set something up with aggreagate device i suppose but it would be better to have the feature to hand.
    5. you need to look into your project manager prefs. scan the paths and the links to the audio files will be saved meaning they will load up in a fraction of the time.
    6. yes this is nuts. you can skip all and sort it out with PM but then you shouldn't have to.
    7. this exists already. perhaps it ought to be a default but you need to set your esx prefs to 'keep common samples in memeory when switching songs'. then it will do just as you wish it to. you can also use the au lab in the devlopers kit which will allow you to load in au units etc seperately from logic, which logic can then access. this is a good way of getting around the 4 GB memory limit with logic too.
    8. ok, don't know about this bug.
    9. yep happens here too.
    10. doesn't worry me this one. you can turn off midi out.
    11. yes this is silly.
    12. well, i think this is something we can get used to. i am a musician and i am used to seeing '24'.
    13. you can already set up groove templates to allow for quantizing irrational tuplets. i do it all the time. i would like to see step input for irrational tuplets though.
    14. yes this is silly. the button for the KC 'content catch' is getting very worn out.
    15. ok.
    16. not sure i understand this one.
    17. yes this drives me nuts too. i have to lock screensets to get this to stay off.
    18. you can use KCs for 'go into/out of sequence' - but yeah.
    19. ok
    20. there are a couple of features that use old technology that cause hangs and poor performance. score is a good example of that. maybe the matrix is too. the score is being updated we assume with newer technology maybe the matrix will too.
    21. there are probably better ways of adjusting velocity than using matrix or hperdraw velocity. have you tried holding control-option and click dragging a note in score?
    22. as i pointed out in 20, this is an old feature. you could change things to be consistent with modern macs and annoy long term users such as myself, or leave them and let them be inconsistent to confuse newbies. i think depending on what it is we oldies could upgrade our work habits.
    23. this one doesn't worry me so much.
    24. good point (no pun intended).
    25. well, i find the opposite - that merging new parts to objects i have accidentally selected to be annoying. perhaps more detailed prefs?
    26. yep.
    27. this will be down to your audio settings. you can improve this lag but it will be dependant on the capabilities of your system.
    28. i don't know why this feature doesn't work in logic. it is supposed to have ti already and i just don't understand why it doesn't. maybe it will be fixed in the next upgrade.
    29. agreed.
    30. ok - i have other work flows for this but it would be nice.
    31. i don't agree that logic is a pain to score with to film, i do it nearly everyday. but you are discribing an interesting feature which might be worth discussing more. i think you might find yourself getting alarming and unmiscal results doing this that will end up having to be sorted out the conventional way. but its a good idea.
    32. oh yes.
    33. yeah - this could be improved.
    34. ok, well i wouldn't go about it this way, but yeah there is generally sticky spots with regards to updating of information al around logic.
    25. very very good idea.
    26. there are lots of problems with the chase function. very annoying. i certainly agree with this.
    in general, some of these could well be done as their own threads. some of the missing functionality may exist. if you can confirm a bug then you are on stronger ground when you submit feedback. but this list is full of fantastic ideas.

  • No horizontal scroll bar on the Jtable. In order to see long column.....

    No horizontal scroll bar on the tJable.
    In order to see long cell data we have to eliminate other columns of the table.
    I need an horizontal scroll bar on the JTable if the data in a cell is longer.
    Could somebody help me out?
    Thanks in advance.

    in the jtable use following method :
    myTable.setAutoResizeMode(this.AUTO_RESIZE_OFF);
    KR,
    Jan

  • How can I add a row into a JTable with JButton

    Hi all. I have the following code:
    package gui;
    import db.*;
    import javax.swing.table.AbstractTableModel;
    import java.util.ArrayList;
    public class FoundersTable extends AbstractTableModel{
        private static final int COLUMNS = 8;
        private String columnNames[] = {"��� ����", "���", "�������", "�������", "���������", "��������",
                "����� �� ����������", "������ �� ����, �����"};
        private ArrayList data;
        public FoundersTable(){
            data = new ArrayList();
        public int getRowCount() {
            return data.size();
        public int getColumnCount() {
            return columnNames.length;
        public String getColumnName(int colIndex) {
            return columnNames[colIndex];
        public Object getValueAt(int rowIndex, int columnIndex) {
            return ((ArrayList)data.get(rowIndex)).get(columnIndex);
        public void setValueAt(Object value, int rowIndex, int columnIndex) {
            ((ArrayList)data.get(rowIndex)).set(columnIndex, value);
            fireTableCellUpdated(rowIndex, columnIndex);
        public void addRow(ArrayList neueZeile) {
            data.add(neueZeile);
            int index = data.size() - 1;
            fireTableRowsInserted(index, index);
        public void removeRow(int index) {
            data.remove(index);
            fireTableRowsDeleted(index, index);
        public void removeAllRows() {
            data.clear();
            fireTableRowsDeleted(0, 0);
        public boolean isCellEditable(int rowIndex, int columnIndex) {
            return true;
    }Now in my MainJFrame class I have one button for additing and one button for removing a selected row. How can I add/remove rows with this two buttons.
    Thanks

    No my question is how can I add and remove rows WITH buttons My point was the code is the same. You use the addRow(...) method. Why did you write an addRow(...) method if you aren't going to use it?
    I don't understand your problem. Do you not know how to write an ActionListener?

  • Java.io.NotSerializableException when overwrite the JTable data into .txt file

    hi everyone
    this is my first time to get help from sun forums
    i had java.io.NotSerializableException: java.lang.reflect.Constructor error when overwrite the JTable data into .txt file.
    At the beginning, the code will be generate successfully and the jtable will be showing out with the data that been save in the studio1.txt previously,
    but after i edit the data at the JTable, and when i trying to click the save button, the error had been showing out and i cannot succeed to save the JTable with the latest data.
    After this error, the code can't be run again and i had to copy the studio1.txt again to let the code run 1 more time.
    I hope i can get any solution at here and this will be very useful for me.
    the following is my code...some of it i create it with the GUI netbean
    but i dunno how to attach my .txt file with this forum
    did anyone need the .txt file?
    this is the code that suspect maybe some error here
    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
    String filename = "studio1.txt";
              try {
                  FileOutputStream fos = new FileOutputStream(new File(filename));
                  ObjectOutputStream oos = new ObjectOutputStream(fos);
                   oos.writeObject(jTable2);
                   oos.close();
              catch(IOException e) {
                   System.out.println("Problem creating table file: " + e);
                   return;
              System.out.println("JTable correctly saved to file " + filename);
    }the full code will be at the next msg

    this is the part 1 of the code
    this is the full code...i had /*....*/ some of it to make it easier for reading
    package gui;
    import javax.swing.*;
    import java.io.*;
    public class timetables extends javax.swing.JFrame {
        public timetables() {
            initComponents();
        @SuppressWarnings("unchecked")
        private void initComponents() {
            jDialog1 = new javax.swing.JDialog();
            buttonGroup1 = new javax.swing.ButtonGroup();
            buttonGroup2 = new javax.swing.ButtonGroup();
            buttonGroup3 = new javax.swing.ButtonGroup();
            buttonGroup4 = new javax.swing.ButtonGroup();
            jTextField1 = new javax.swing.JTextField();
            jLayeredPane1 = new javax.swing.JLayeredPane();
            jLabel6 = new javax.swing.JLabel();
            jTabbedPane1 = new javax.swing.JTabbedPane();
            jScrollPane3 = new javax.swing.JScrollPane();
            jTable2 = new javax.swing.JTable();
            jScrollPane4 = new javax.swing.JScrollPane();
            jTable3 = new javax.swing.JTable();
            jButton1 = new javax.swing.JButton();
            jButton2 = new javax.swing.JButton();
    /*       org.jdesktop.layout.GroupLayout jDialog1Layout = new org.jdesktop.layout.GroupLayout(jDialog1.getContentPane());
            jDialog1.getContentPane().setLayout(jDialog1Layout);
            jDialog1Layout.setHorizontalGroup(
                jDialog1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                .add(0, 400, Short.MAX_VALUE)
            jDialog1Layout.setVerticalGroup(
                jDialog1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                .add(0, 300, Short.MAX_VALUE)
            setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
            jLayeredPane1.add(jLabel6, javax.swing.JLayeredPane.DEFAULT_LAYER);
            String filename1 = "studio1.txt";
            try {
                   ObjectInputStream ois = new ObjectInputStream(new FileInputStream(filename1));
                   jTable2 = (JTable) ois.readObject();
                   System.out.println("reading for " + filename1);
              catch(Exception e) {
                   System.out.println("Problem reading back table from file: " + filename1);
                   return;
            try {
                   ObjectInputStream ois = new ObjectInputStream(new FileInputStream(filename1));
                   jTable3 = (JTable) ois.readObject();
                   System.out.println("reading for " + filename1);
              catch(Exception e) {
                   System.out.println("Problem reading back table from file: " + filename1);
                   return;
            jTable2.setRowHeight(20);
            jTable3.setRowHeight(20);
            jScrollPane3.setViewportView(jTable2);
            jScrollPane4.setViewportView(jTable3);
            jTable2.getColumnModel().getColumn(4).setResizable(false);
            jTable3.getColumnModel().getColumn(4).setResizable(false);
            jTabbedPane1.addTab("STUDIO 1", jScrollPane3);
            jTabbedPane1.addTab("STUDIO 2", jScrollPane4);
            jTextField1.setText("again n again");
            jLabel6.setText("jLabel5");
            jLabel6.setBounds(0, 0, -1, -1);
            jButton2.setText("jButton2");
            jButton1.setText("jButton1");
            jButton1.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jButton1ActionPerformed(evt);
          

  • Java.io.NotSerializableException when overwrite the JTable data into .txt

    hi everyone
    i had java.io.NotSerializableException: java.lang.reflect.Constructor error when overwrite the JTable data into .txt file.
    At the beginning, the code will be generate successfully and the jtable
    will be showing out with the data that been save in the studio1.txt
    previously,
    but after i edit the data at the JTable, and when i trying to click the
    save button, the error had been showing out and i cannot succeed to
    save the JTable with the latest data.
    After this error, the code can't be run again and i had to copy the studio1.txt again to let the code run 1 more time.
    I hope i can get any solution at here and this will be very useful for me.
    but i dunno how to attach my .txt file with this forum
    did anyone need the .txt file?
    the following is my suspect code
    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
    String filename1 = "studio1.txt";
              try {
                  FileOutputStream fos = new FileOutputStream(new File(filename1));
                  ObjectOutputStream oos = new ObjectOutputStream(fos);
                   oos.writeObject(jTable2.getModel());
                   oos.flush();
                   oos.close();
                   fos.close();
              catch(IOException e) {
                   System.out.println("Problem creating table file: " + e);
                            e.printStackTrace();
                   return;
              System.out.println("JTable correctly saved to file " + filename1);
    }this is the reading code
    String filename1="studio1.txt";
            try {
                   ObjectInputStream ois = new ObjectInputStream(new FileInputStream(filename1));
                   TableModel model = (TableModel)ois.readObject();
                    jTable3.setModel(model);
                   System.out.println("reading for " + filename1);
              catch(Exception e) {
                   System.out.println("Problem reading back table from file: " + filename1);
                   return;
              }Edited by: Taufulou on Jan 8, 2009 11:43 PM
    Edited by: Taufulou on Jan 8, 2009 11:44 PM
    Edited by: Taufulou on Jan 8, 2009 11:45 PM

    is this the code u mean?
    i had put this code inside it but the problem still remain the same
    if (jTable2.isEditing()) {
                jTable2.getCellEditor().stopCellEditing();
            }i had found a new thing that when i just double click the cell without change any data inside the table
    and click the button "Save". the same exception which is
    java.io.NotSerializableException: java.lang.reflect.Constructor
    will come out again.

  • How do I move from one keynote slide to the next with ios8?, How do I move from one keynote slide to the next with ios8?

    I don't seem to be able to move from one simple keynote slide to the next.
    I just have text on each - like notes for a presentation.

    Howdy tommmy,
    To go to the next slide in a Keynote for iOS presentation, tap on the screen with one finger. See this article for information about gestures in Keynote -
    Keynote for iOS (iPad): Touchscreen basics for Keynote
    Tap
    Using one finger, quickly and firmly touch the screen and then lift your finger. Use this gesture to select an object or activate a button. You also use this gesture to advance to the next slide when playing a presentation.
    Thanks for using Apple Support Communities.
    Best,
    Brett L 

  • How to do the lsmw with bapi?

    hi
    while upload the vendor master data using (xk01) from nonsap to sap
    how to do the lsmw with bapi? pls could u give the steps with scren shot to me.
    regards
    eswar.

    Hi
    BAPI - BAPIs (Business Application Programming Interfaces) are the standard SAP interfaces. They play an important role in the technical integration and in the exchange of business data between SAP components, and between SAP and non-SAP components. BAPIs enable you to integrate these components and are therefore an important part of developing integration scenarios where multiple components are connected to each other, either on a local network or on the Internet.
    BAPIs allow integration at the business level, not the technical level. This provides for greater stability of the linkage and independence from the underlying communication technology.
    LSMW- No ABAP effort are required for the SAP data migration. However, effort are required to map the data into the structure according to the pre-determined format as specified by the pre-written ABAP upload program of the LSMW.
    The Legacy System Migration Workbench (LSMW) is a tool recommended by SAP that you can use to transfer data once only or periodically from legacy systems into an R/3 System.
    More and more medium-sized firms are implementing SAP solutions, and many of them have their legacy data in desktop programs. In this case, the data is exported in a format that can be read by PC spreadsheet systems. As a result, the data transfer is mere child's play: Simply enter the field names in the first line of the table, and the LSM Workbench's import routine automatically generates the input file for your conversion program.
    The LSM Workbench lets you check the data for migration against the current settings of your customizing. The check is performed after the data migration, but before the update in your database.
    So although it was designed for uploading of legacy data it is not restricted to this use.
    We use it for mass changes, i.e. uploading new/replacement data and it is great, but there are limits on its functionality, depending on the complexity of the transaction you are trying to replicate.
    The SAP transaction code is 'LSMW' for SAP version 4.6x.
    Check your procedure using this Links.
    BAPI with LSMW
    http://esnips.com/doc/ef04c89f-f3a2-473c-beee-6db5bb3dbb0e/LSMW-with-BAPI
    For document on using BAPI with LSMW, I suggest you to visit:
    http://www.****************/Tutorials/LSMW/BAPIinLSMW/BL1.htm
    <b>Reward points for useful Answers</b>
    Regards
    Anji

  • WVC80N cannot see the image with VLC when multicasting

    I am using the WVC80N camera and have set the multicast address to 225.0.0.6 and the port to 2006 but when I try to view the image with VLC I cannot see and image. HTTP and rtsp both work but I need to use multicasting, has anyone gotten this to work?

    When you talk about the multicast , may I know if where is it set? Is it set on the route,server or computer? When you talk about VLC, where you referring to the VLC media player? Is also possible if you will show us a complete diagram on how your network has been setup so that we will be able to provide you the right recommendation.  

  • How to Populate the JTable Object programatically with SQL Results

    I'm wondering if someone could help me on how to populate the JTable Object with SQL Results wherein the Row of tjhe JTable object is automatically adjusted depending on how many records you have queried.
    Thanks in advance and God bless! (",)
    * frmMain.java
    * Created on October 4, 2006, 6:15 AM
    package tds;
    import java.io.*;
    import java.awt.Toolkit;
    import javax.swing.JFrame;
    import javax.imageio.*;
    import javax.swing.JFrame;
    import java.sql.*;
    import javax.swing.table.DefaultTableModel;
    * @author Dexter.Carlit
    public class frmMain extends javax.swing.JFrame {
    private Connection connection = null;
    private DefaultTableModel model;
    /** Creates new form frmMain */
    public frmMain() {
    initComponents();
    /** This method is called from within the constructor to
    * initialize the form.
    * WARNING: Do NOT modify this code. The content of this method is
    * always regenerated by the Form Editor.
    // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
    private void initComponents() {
    jSplitPane = new javax.swing.JSplitPane();
    jScrollPane1 = new javax.swing.JScrollPane();
    jPanel3 = new javax.swing.JPanel();
    jScrollPane2 = new javax.swing.JScrollPane();
    jTree1 = new javax.swing.JTree();
    jTabbedPane1 = new javax.swing.JTabbedPane();
    jPanel1 = new javax.swing.JPanel();
    jPanel4 = new javax.swing.JPanel();
    jLabel1 = new javax.swing.JLabel();
    jLabel2 = new javax.swing.JLabel();
    jTextField1 = new javax.swing.JTextField();
    jTextField2 = new javax.swing.JTextField();
    jLabel3 = new javax.swing.JLabel();
    jTextField3 = new javax.swing.JTextField();
    jLabel4 = new javax.swing.JLabel();
    jTextField4 = new javax.swing.JTextField();
    jPanel5 = new javax.swing.JPanel();
    jScrollPane3 = new javax.swing.JScrollPane();
    jGrid = new javax.swing.JTable();
    jButton1 = new javax.swing.JButton();
    jButton2 = new javax.swing.JButton();
    jProgressBar1 = new javax.swing.JProgressBar();
    jPanel2 = new javax.swing.JPanel();
    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
    addWindowListener(new java.awt.event.WindowAdapter() {
    public void windowOpened(java.awt.event.WindowEvent evt) {
    formWindowOpened(evt);
    getAccessibleContext().setAccessibleName("frmMain");
    jSplitPane.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));
    jSplitPane.setDividerLocation(200);
    jSplitPane.setDividerSize(10);
    jScrollPane2.setViewportView(jTree1);
    org.jdesktop.layout.GroupLayout jPanel3Layout = new org.jdesktop.layout.GroupLayout(jPanel3);
    jPanel3.setLayout(jPanel3Layout);
    jPanel3Layout.setHorizontalGroup(
    jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
    .add(jPanel3Layout.createSequentialGroup()
    .add(jScrollPane2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 916, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
    .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
    jPanel3Layout.setVerticalGroup(
    jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
    .add(jScrollPane2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 410, Short.MAX_VALUE)
    jScrollPane1.setViewportView(jPanel3);
    jSplitPane.setLeftComponent(jScrollPane1);
    jPanel4.setBorder(javax.swing.BorderFactory.createTitledBorder(""));
    jLabel1.setText("First Name:");
    jLabel2.setText("Last Name:");
    jLabel3.setText("Position :");
    jLabel4.setText("Department:");
    jPanel5.setBorder(javax.swing.BorderFactory.createTitledBorder("Search Results"));
    jGrid.setModel(new javax.swing.table.DefaultTableModel(
    new Object [][] {
    new String [] {
    "LName", "FName", "Position", "Department", "Office No", "Local No", "Office Mobile No", "Home No", "MobileNo", "Email Address"
    jGrid.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_OFF);
    jGrid.setColumnSelectionAllowed(true);
    jGrid.setName("");
    jGrid.setTableHeader(jGrid.getTableHeader());
    jScrollPane3.setViewportView(jGrid);
    jScrollPane3.getAccessibleContext().setAccessibleName("rset");
    org.jdesktop.layout.GroupLayout jPanel5Layout = new org.jdesktop.layout.GroupLayout(jPanel5);
    jPanel5.setLayout(jPanel5Layout);
    jPanel5Layout.setHorizontalGroup(
    jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
    .add(jScrollPane3, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 386, Short.MAX_VALUE)
    jPanel5Layout.setVerticalGroup(
    jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
    .add(jScrollPane3, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 175, Short.MAX_VALUE)
    jButton1.setText("Find");
    jButton1.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jButton1ActionPerformed(evt);
    jButton1.addMouseListener(new java.awt.event.MouseAdapter() {
    public void mouseClicked(java.awt.event.MouseEvent evt) {
    jButton1MouseClicked(evt);
    jButton2.setText("Clear");
    jButton2.addMouseListener(new java.awt.event.MouseAdapter() {
    public void mouseClicked(java.awt.event.MouseEvent evt) {
    jButton2MouseClicked(evt);
    org.jdesktop.layout.GroupLayout jPanel4Layout = new org.jdesktop.layout.GroupLayout(jPanel4);
    jPanel4.setLayout(jPanel4Layout);
    jPanel4Layout.setHorizontalGroup(
    jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
    .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel4Layout.createSequentialGroup()
    .addContainerGap()
    .add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
    .add(org.jdesktop.layout.GroupLayout.LEADING, jPanel5, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
    .add(org.jdesktop.layout.GroupLayout.LEADING, jPanel4Layout.createSequentialGroup()
    .add(jLabel1)
    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
    .add(jTextField1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 343, Short.MAX_VALUE))
    .add(org.jdesktop.layout.GroupLayout.LEADING, jPanel4Layout.createSequentialGroup()
    .add(jLabel2)
    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
    .add(jTextField2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 343, Short.MAX_VALUE)
    .add(1, 1, 1))
    .add(org.jdesktop.layout.GroupLayout.LEADING, jPanel4Layout.createSequentialGroup()
    .add(jLabel3)
    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
    .add(jTextField3, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 138, Short.MAX_VALUE)
    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
    .add(jLabel4)
    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
    .add(jTextField4, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 138, Short.MAX_VALUE))
    .add(jPanel4Layout.createSequentialGroup()
    .add(jButton1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 66, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
    .add(jButton2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 66, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
    .addContainerGap())
    jPanel4Layout.linkSize(new java.awt.Component[] {jButton1, jButton2}, org.jdesktop.layout.GroupLayout.HORIZONTAL);
    jPanel4Layout.setVerticalGroup(
    jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
    .add(jPanel4Layout.createSequentialGroup()
    .addContainerGap()
    .add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
    .add(jLabel1)
    .add(jTextField1))
    .add(18, 18, 18)
    .add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
    .add(jLabel2)
    .add(jTextField2))
    .add(16, 16, 16)
    .add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
    .add(jLabel3)
    .add(jTextField3)
    .add(jLabel4)
    .add(jTextField4))
    .add(14, 14, 14)
    .add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
    .add(jButton2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
    .add(jButton1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
    .add(jPanel5, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
    org.jdesktop.layout.GroupLayout jPanel1Layout = new org.jdesktop.layout.GroupLayout(jPanel1);
    jPanel1.setLayout(jPanel1Layout);
    jPanel1Layout.setHorizontalGroup(
    jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
    .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel1Layout.createSequentialGroup()
    .addContainerGap()
    .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
    .add(org.jdesktop.layout.GroupLayout.LEADING, jPanel4, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
    .add(org.jdesktop.layout.GroupLayout.LEADING, jProgressBar1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 438, Short.MAX_VALUE))
    .addContainerGap())
    jPanel1Layout.setVerticalGroup(
    jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
    .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel1Layout.createSequentialGroup()
    .addContainerGap()
    .add(jPanel4, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
    .add(jProgressBar1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
    jTabbedPane1.addTab("Search", jPanel1);
    org.jdesktop.layout.GroupLayout jPanel2Layout = new org.jdesktop.layout.GroupLayout(jPanel2);
    jPanel2.setLayout(jPanel2Layout);
    jPanel2Layout.setHorizontalGroup(
    jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
    .add(0, 458, Short.MAX_VALUE)
    jPanel2Layout.setVerticalGroup(
    jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
    .add(0, 401, Short.MAX_VALUE)
    jTabbedPane1.addTab("Directory", jPanel2);
    jSplitPane.setRightComponent(jTabbedPane1);
    org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(
    layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
    .add(jSplitPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 675, Short.MAX_VALUE)
    layout.setVerticalGroup(
    layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
    .add(jSplitPane)
    pack();
    }// </editor-fold>//GEN-END:initComponents
    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
    }//GEN-LAST:event_jButton1ActionPerformed
    private void jButton2MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton2MouseClicked
    jGrid.setModel(new javax.swing.table.DefaultTableModel(
    new Object [][] {
    {null, null, null, null, null, null, null, null, null, null},
    {null, null, null, null, null, null, null, null, null, null},
    {null, null, null, null, null, null, null, null, null, null},
    {null, null, null, null, null, null, null, null, null, null}
    new String [] {
    "LName", "FName", "Position", "Department", "Office No", "Local No", "Office Mobile No", "Home No", "MobileNo", "Email Address"
    jGrid.updateUI();
    }//GEN-LAST:event_jButton2MouseClicked
    private void jButton1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton1MouseClicked
    try {
    //Load and register SQL Server driver
    Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
    //Establish a connection
    Connection connection = DriverManager.getConnection("jdbc:microsoft:sqlserver://X.X.X.X:1433","MyAccount","MyPassword");
    //Create a Statement object
    Statement sql_stmt = connection.createStatement();
    //Create a ResultSet object, execute the query and return a
    // resultset
    ResultSet rset = sql_stmt.executeQuery("SELECT * FROM EpxDirectory..Directory Order By LName");
    // Populates a JTABLE Object
    int i=0;
    while (rset.next()){
    String LName = rset.getString(1);
    String FName = rset.getString(2);
    String Position = rset.getString(3);
    String Dept_Code = rset.getString(4);
    String OffPhoneNo = rset.getString(5);
    String LocalNo = rset.getString(6);
    String OffMobileNo = rset.getString(7);
    String HomePhoneNo = rset.getString(8);
    String MobileNo = rset.getString(9);
    String Email = rset.getString(10);
    jGrid.updateUI();
    jGrid.setValueAt(rset.getString(1).trim(),i,0);
    jGrid.setValueAt(rset.getString(2).trim(),i,1);
    jGrid.setValueAt(rset.getString(3).trim(),i,2);
    jGrid.setValueAt(rset.getString(4).trim(),i,3);
    jGrid.setValueAt(rset.getString(5).trim(),i,4);
    jGrid.setValueAt(rset.getString(6).trim(),i,5);
    jGrid.setValueAt(rset.getString(7).trim(),i,6);
    jGrid.setValueAt(rset.getString(8).trim(),i,7);
    jGrid.setValueAt(rset.getString(9).trim(),i,8);
    jGrid.setValueAt(rset.getString(10).trim(),i,9);
    i++;
    //Close the ResultSet and Statement
    rset.close();
    sql_stmt.close();
    //Close the database connection
    connection.close();
    System.out.println(Integer.toString(i) + " rows found");
    } catch(Exception e) {
    System.out.println("Failed to connect; Please view Stack Trace");
    e.printStackTrace();
    }//GEN-LAST:event_jButton1MouseClicked
    private void formWindowOpened(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowOpened
    }//GEN-LAST:event_formWindowOpened
    public static void run(){
    java.awt.EventQueue.invokeLater(new Runnable() {
    public void run() {
    frmMain frmMain = new frmMain();
    frmMain.setLocationRelativeTo(null); // Center the JFrame on the
    frmMain.setVisible(true);
    private void exitApplication() {
    // try {
    // //gui.putStatus("Closing the connection....please wait.....");
    // if(connection != null) {
    // // connection.close(); //Closing the connection object.
    // } catch(SQLException ex) { //Trap SQLException
    // //gui.putStatus(ex.toString());
    System.exit(0); //Exit the aplication
    * @param args the command line arguments
    public static void main(String args[]) {
    run();
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton2;
    private javax.swing.JTable jGrid;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JProgressBar jProgressBar1;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JSplitPane jSplitPane;
    private javax.swing.JTabbedPane jTabbedPane1;
    private javax.swing.JTextField jTextField1;
    private javax.swing.JTextField jTextField2;
    private javax.swing.JTextField jTextField3;
    private javax.swing.JTextField jTextField4;
    private javax.swing.JTree jTree1;
    // End of variables declaration//GEN-END:variables
    }

    Use code tags.
    Don't mix GUI and JDBC together. Split them out into separate classes.
    You have a good start, but you will need to loop through your resultset and also pull the ResultSet metaData for you column headings

  • JTable overrides the accelerator on JMenuItem

    I have a JFrame which has a JMenu. Some of the menu items have accelerators associated with them. And the JFrame has a JTable. The accelerators are working only when the focus is not in the JTable. But they are not working when the focus is in JTable. For example, when I selected a row in the table and press the accelerator key, it is not working. Can somebody provide me the solution for it?

    Here is the code:
    public class SwingEventPropagationTest {
         private static final int shortcutKeyAsciiValue = 65; //A
         public static void main(String[] args) {
              final JFrame frame = new JFrame();
              JMenuBar menuBar = new JMenuBar();
              JMenu menu = new JMenu("Edit");
              JMenuItem menuItem = new JMenuItem("Test");
              KeyStroke ctrlAKeyStroke = KeyStroke.getKeyStroke(shortcutKeyAsciiValue, InputEvent.CTRL_MASK);
              menuItem.setAccelerator(ctrlAKeyStroke);
              menuItem.addActionListener(new SelectAllAction());
              menu.add(menuItem);
              menuBar.add(menu);
              frame.setJMenuBar(menuBar);
              final JTable table = new JTable(new NumericTableModel());
              //Remove Keybindings from table
              table.getInputMap().put(ctrlAKeyStroke, "doNothing");
              table.getActionMap().put("doNothing", new DoNothingAction());
              JScrollPane scrollpane = new JScrollPane(table);
              JPanel panel = new JPanel();
              panel.add(new JButton("test"));
              panel.add(scrollpane);
              frame.getContentPane().add(panel);
              frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
              frame.setSize(500,500);
              frame.setVisible(true);
         private static class NumericTableModel extends AbstractTableModel{
              public int getColumnCount() { return 2; }
              public int getRowCount() { return 10;}
              public Object getValueAt(int row, int col) {
                   int value = (row*2) + (col+1);
                   return value;
         private static class SelectAllAction extends AbstractAction{
              public void actionPerformed(ActionEvent e) {
                   //This should be shown when Shortcut Key is pressed
                   JOptionPane.showMessageDialog(null, "Worked");
         private static class DoNothingAction extends AbstractAction{
              public void actionPerformed(ActionEvent e) {
                   //do nothing
    }

  • I have photoshop CC. I cannot open two files such as Tiffs and view them side by side. When I open the second file it overrides the first. Do I need to do something with preferences?

    I have photoshop CC. I cannot open two files such as Tiffs and view them side by side. When I open the second file it overrides the first. Do I need to do something with preferences?

    What happens when you try to use the clone stamp tool?
    It should work with the images side by side.
    You can setup photoshop cc to be like photoshop cs2 was on your other mac, by going to Photoshop>Preferences>Interface and unchecking
    Open Documents as Tabs and Enable Floating Document Window Docking
    And also going to Window and unchecking Application Frame

  • Is it possible to override the built-in PDF format handler with a custom IFilter for PDF?

    Hi,
    SharePoint 2013 comes with a built-in "format handler" for PDF now, so it can index PDF files out of the box. This is great for most users, as it now no longer is necessary to install a third-party IFilter for crawling PDF documents.
    My question is, is it possible to override the built-in format handler for PDF with a custom IFilter for PDF? I played with the Set-SPEnterpriseSearchFileFormatState and Remove-SPEnterpriseSearchFileFormat cmdlets. While it is possible to deactivate
    the built-in format handler, I was not able to remove it and to create a new one that activates a custom IFilter for PDF files.
    Background of the question: While the new built-in format handler for PDF will probably be sufficient for many SharePoint users, some need additional capabilities regarding indexing if PDF documents, e.g. extraction of custom metadata from PDF's document
    information dictionary and embedded XMP metadata. PDFlib GmbH, the company I work form, sells an IFilter for PDF, and of course we would like to continue to offer this for SharePoint 2013.
    Thanks
    Stephan

    You should be able to replace it with any ifilter you want, this is the procedure for installing it:
    Install PDF iFilter 9.0 (64 bit) from
    http://www.adobe.com/support/downloads/detail.jsp?ftpID=4025 (http://www.adobe.com/support/downloads/detail.jsp?ftpID=4025)
    Download PDF icon picture from Adobe web site
    http://www.adobe.com/misc/linking.html (http://www.adobe.com/misc/linking.html)  and copy to C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\TEMPLATE\IMAGES\
    Add the following entry in docIcon.xml file, which can be found at: C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\TEMPLATE\XML
    <Mapping Key="pdf" Value="pdficon_small.png" />
    Add pdf file type on the File Type page under Search Service Application
    Open regedit
    Navigate to the following location:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office Server\15.0\Search\Setup\ContentIndexCommon\Filters\Extension
    Right-click > Click New > Key to create a new key for .pdf
    Add the following GUID in the default value
    {E8978DA6-047F-4E3D-9C78-CDBE46041603}
    •Restart the SharePoint Server Search 15
    •Reboot the SharePoint servers in Farm
    •Create a Test site (with any out-of-box site template) and create a document library upload any sample PDF document(s).
    •Perform FULL Crawl to get search result.
    Once the crawl is completed we will get search results.
    Kind regards,
    Margriet Bruggeman
    Lois & Clark IT Services
    web site: http://www.loisandclark.eu
    blog: http://www.sharepointdragons.com

Maybe you are looking for