DispatchEvent() problem (bug?)

Hi all.
I'm using a glasspane to process all mouse clicks that occur on inert, or 'no-state' components that don't require to be redrawn when they are clicked (ie
SwingUtilities.getDeepestComponentAt(contentPane, x, y)
returns a component such as a jpanel or a jlabel), and i'm redirecting all other events using:
MouseEvent event2 = SwingUtilities.convertMouseEvent(glassPane, event, component);component.dispatchEvent(event2);
The problem is that the dispatchEvent method doesn't trigger changes in the components' state or GUI that would normally occur if I wasn't using a glasspane: the checkmarks for checkboxes don't appear, comboboxes don't display their menus, textfields don't display a caret, buttons don't click, tabbedpanes don't change tabs, etc.
I've tried the using component.doClick() and it works fine, but i'm stumped for any component that doesn't extend AbstractButton. I don't feel like adding mouse listeners to all my components (there are over 100 of them!) just to call processMouseEvent (whether or not that would solve my problem) because they don't otherwise need to listen for mouse clicks (validations are processed when an action occurs on an OK button). Do I need to redirect the mouse events in a different way? Is there a command i should add after the dispatchEvent statment?
I could really use some help. Thanx :)

Thanx viravan for your input. After trying it out, however, a few problems arose:
A) Without considering the fact that you're suggestion would lead to a bad archetacture, as you probably know ( ;o) ), that would require that I add a mouse listener to all components just to make the glasspane visible again...and, like i said above, adding mouse listeners to over 100 components that otherwise don't need them is something i'm trying to avoid.
B) I tested the following method on a single checkbox and it works, the checkmark is drawn, even with a visible glasspane, after recieving the redipatched event:checkbox.addMouseListener(new MouseAdapter()
            public void mouseClicked(MouseEvent event)
                JCheckBox checkbox = (JCheckBox) event.getSource();
                checkbox.setSelected(!checkbox.isSelected());
        });So this isn't a matter of whether or not the glasspane is visible.
C) Adding some code (see below) in the glasspane mouselistener method revealed that the state of the JCheckBox did in fact not change so it's not only a matter of paint, but a matter of changing state.                        System.out.println("State: " + ((JCheckBox) component).isSelected());
                        glassPane.setVisible(false);
                        component.dispatchEvent(event2);
                        System.out.println("State: " + ((JCheckBox) component).isSelected());The print commands return "State: false" both before and after the dispatchEvent command.

Similar Messages

  • Reporting some proxy problems/bugs

    Is there a way to report problems/bugs in the proxy software without having support? I believe this can be done for Java, but what about the proxy?
    In our environment we are using the proxy software (currently v4.0.5, but I haven't seen these items in the release notes of the newer versions of the software) in the reverse proxy mode and have encountered what I believe may be a couple of bugs.
    Possibly related to a previous poster's "Content-length mismatch" error message, it seems that some app servers respond to an If-modified-since conditional GET request incorrectly by sending a Content-length header along with the "304 not modified response" (there should be no such header in a 304 response). When proxy caching is enabled and the GZip compression filter is used, one result I have seen is the "Content-length match" error message which happens when the incorrectly included Content-length header has a non-zero value. A different result occurs when the incorrectly included Content-length header has a value of zero - the proxy response body gets truncated (completely removed).
    A second issue I have seen is with the reverse proxy's handling of a POST with a trailing CR/LF which some browsers (IE) send incorrectly (there should be no such trailing CR/LF in a POST request). The proxy seems to handle the trailing CR/LF for the request/response, however if HTTP1.1 keepalive is used and the POST is followed by a GET request on the same open connection from the browser then the access log entry for the GET request will be broken across two lines.
    Hopefully someone from Oracle monitoring these forums will pass these on to the proxy dev team.

    Yep, I realize Safari on Windows uses Windows Internet Options to get proxy server info BUT the Windows Internet Options don't provide a place to specify the proxy login information.
    As a result, when the browser contacts the proxy it usually (or should) prompt the user for the login info. Safari did the first time and I told it to save the info. Then my login info changed and rather than prompt for it again, Safari sits there and doesn't load any pages.
    IE7 uses the same proxy without problems because IE uses the domain login credentials to connect to the proxy server.
    Google Chrome uses the Windows Internet Options for proxy support and it prompts me to login to the proxy each time I fire it up and access a website.
    Mozilla Firefox 3.0.4 will prompt me for login information if the login info it has stored won't work for the proxy connection.
    Opera 9.62 prompts me for the proxy login information each time I fire it up, just like Google Chrome.
    Out of all of those browsers, Safari is the only one that can't use the proxy because I can't change the login information for the proxy connection.
    Peace...

  • OWB 11.2.0.1 – Known Problems/bugs resolutions ?

    OWB 11.2.0.1 – Known Problems/bugs resolutions ?
    ==========================================
    We are using OWB 11gR2, Java(TM) Platform     1.5.0_17, Oracle IDE     11.2.0.1.0.
    We are finding the strange behavior in OWB Design center. Here is the situation.
    1) OWB Design Center>Databases>Defined Module> Mappings>MAP1>Mapping Editor>Expression Editor>
    Output attributes>Expression Builder
    Specify the expression and press OK.
    Another Expression Builder opens up with blank window. We need to specify the expression again.
    2) Same as above after opening expression Builder, if we go to another apps (eg. SQL Developer, MS Word) and come back expression Builder disappeared from the context.
    We find only Expression Editor. Design Center Hangs. It is not responding to any KEYs. We need to kill the application via task manager and re-start.
    Are these issues related to OWB client piece or OWB Client+Server piece?
    We did not find any events reporting at DB alert Logs for such events. Do we need to set up some trace ON to record such events?
    Are there any log files/tables record such events at OWB repository level to trace back?
    Do we have OWB 11.2.0.1 known issues/bugs, resolutions list posted somewhere?
    Thanks in helping.

    We reviewed the release notes, where it says this patch will improve performance (Bug 7359939).
    We find another note in metalink (provided by our DBA team) says
    Poor Performance of Mapping Validation / Generation in: OWB 11.2.0.1 + Megapatch 10270220 and OWB 11.2.0.2 [ID 1303177.1]
    Are we going to face a new problem after applying this patch?
    Thanks in helping.

  • GreenSock Doubling Problem (Bug?)

    I've run into an issue where if I set the visibility to an object that is being tweened to 1, GS creates a second instance of the object.
    In the attached file, click the 'btn' and notice that a 2nd row of envelopes is created and they are not blitted like the original instance.
    Bug or operator error?
    Thanks.
    www.thepixelfarm.com/tmp/GS_doublingProb01.zip

    This is NOT a bug. See the answer in the GreenSock forums:
    http://forums.greensock.com/topic/6163-greensock-doubling-problem-bug/

  • Problems / Bugs / Improvements we have found - Experienced users.

    Hello there,
    I work for an animation / film company and After Effects is an integral part of out production services. As much as we love the program, its not without its flaws. Here are some things we have found after using After Effects day in and day out...
    Clone Stamp :
    Please can you add a keyframe-able 'offset' feature to the clone stamp source region? It seems that there isn't a great way of  doing this without expressions. We found a workaround which is to offset the centre point of the tracker before we do the track, then parent the clone source region to this point. Theres a lot of people online who think the cloner is completely broken for use in video, but the problem is that theres no easy way to parent the source region to a tracker...
    Rendering :
    Practically every day we turn up to work and find that a lot of renders weren't successful. This causes us lots and lots of unnecessary stress and problems. If there is any stability fixes that you can do then we would be highly appreciative. (Possibly just making it so that the ram is purged after each clip is rendered? - It seems to be a memory problem half the time even though this machine has 64GB of ram...). Renders also seem to be excruciatingly slow at times, even though were using an extremely powerful machine; is there nothing that can be done to accelerate renders and/or use more of the computers resources? We have found that sometimes if we pre-render a comp, it renders pretty instantaneously when in the render queue, whereas we have seen the same comp stuck doing barely anything in the render queue for hours..?
    Additionally, can there be a way to change the render path/settings of multiple renders in one go? Unless were mistaken, it seems like each clip has to be manually set up and this is extremely painstaking when working with a lot of files! Also media encoder doesn't seem to render files accurately quite a lot of the time, not sure at all where the problem is but we have totally stopped using this way of rendering now as the renders rarely come out as expected.
    Switching between comps:
    PLEASE can you create a MASTER FX switch, which will turn off ALL the effects and motion blur in the entire project (not just the comp you are in)? This would be an amazing feature as we spend SO much time just waiting for heavy comps to open just so we can add them to the render queue... Possibly this could not effects the final render, but just allow you to quickly get into a comp? We know that caps lock stops any preview being loaded but there are many limitations to this approach.
    Motion blur:
    Sometimes we notice that if we have motion blur switched on inside of pre-comps, the blur is being calculated and applied multiple times, which looks horrible and takes forever to calculate... A master motion blur controller is long overdue in After Effects and programs such as Nuke have had this feature since day 1. We would love to see this feature and i'm sure there are many others who would too!
    3D controls:
    We would love to see better 3D controls for positioning layers etc - if there were improvements on the 3D manipulation tools (Rotate,translate,scale...) to resemble the look of a full 3D program, our lives would be much easier .
    Mesh warp / Nulls:
    It would be amazing to be able to parent points on the mesh warp to a null object, or at least give every mesh warp point a positional value. This would enable animators to create much improved 2D rigs for characters etc! At the moment the mesh warp isn't very robust and is difficult to get the desired control and effect.
    Lens blur/Depth of field:
    Can you please add an easier way to see what is in focus and whats not, when using a depth pass? There is a great feature in Nuke which allows u to see where the depth of field is taking place called 'focal plane setup', but it seems that after effects is a case of trial and error when dealing with this kind of task! Would also be amazing if you could simply click the area you want to be in focus (like in Nuke )
    Duplicating comps and child comps:
    PLEASE can you add an option to duplicate a comp as well as all the comps inside of it? If your dealing with complex projects it is horrific to have to go in and duplicate the comp then ALT drag the duplicate in so your not destroying other comps linked to that comp (hope that doesn't sound too confusing!). There are some scripts when claim to add this functionality but we've had no joy with any of these so far...
    Multiple comps / new viewer problems
    This is a big one for me and my colleagues. When there are two comp viewers on screen, please can you make the timeline switch to the corresponding comp when you click within the viewer window? Its a huge pain to have to switch between timelines when your doing this! Please can you also add the option to add real time updates in both comp viewers when you have two comp viewers on screen? It seems that only one updates in real time which can be pretty annoying...
    I think thats everything for now, it would be amazing if you could rectify some of these problems as i know it would make a lot of people very happy!
    Cheers!

    Some of the issues you're describing already have fixes underway. Specifically rendering and switching between comps. The Adobe folks have said that the majority of the After Effects team is working on making AE behave differently (much more quickly) in interactivity and rendering. As I've heard it described, it sounds a lot like it'll answer both of those issues.
    I believe I speak for all of us who use AE every day when I say, "We cannot wait! (Well, we can wait until the bugs are squashed...but you know what we mean!)" If you missed the initial public discussion on this: Happy New Year! ~ and a question… The overwhelming response to that question was FASTER! And the AE team listened. YAY!
    Please have you (and everyone on your team who cares) file feature requests for the rest of these too. It would be great to be able to have the functionality of the True Comp Duplicator script a little more robustly and integrated into AE! And the DOF thing is a biggie too. Adobe - Feature Request/Bug Report Form
    The folks on the AE team do listen to feature requests and the more they get for a certain feature, the higher priority it gets.
    This is just a forum for users to help each other. Granted, the AE team is great about looking in too, but feature requests are the official way for them to track these things.
    And, hey, EVERYONE ELSE reading this; file feature requests too! Adobe wants us to stay subscribed and happy, so let them know what we need/want.

  • Blur Problems (bug report submitted)

    I've submitted a bug report and will submit this again since its a better version of when I sent them before. The problem is this:
    - Adobe Acrobat Professional shows blur in certain situations. In another situation, the same file opens correctly. The file below is self-explanatory, i.e.:
    1. This is what you see when you do a fresh start, with no pre-existing Adobe processes running. Sometimes though the blur will show up even if its a fresh start.
    2. Thats what you see when the file has been closed but Acrobat Professional is still running and open.
    If anyone needs the original PDF, it can be downloaded at:
    http://www.2shared.com/document/P927Y4Vm/scanned-doc-2.html
    In area 1, you can see the glaring difference in visual quality. The blur makes it very hard and irritating to read the PDF. Notice how the blur alternates. Some areas are sharp while others are soft. Area 2 is how it should always look like (crisp).
    If you cant see this image properly, it is uploaded at:
    http://img96.imageshack.us/img96/4113/adobeacrobatproblurbug.jpg
    Adobe Acrobat Professional version, latest: 9.3.4
    System: Windows XP
    BUG: Adobe Acrobat Professional shows blurry PDFs in certain situations.
    ===
    STEPS TO RECREATE THE BUG:
    Use Windows XP. I'm not sure if this shows up in Vista too. I'm sure it does.
    1. Download the PDF from:
    http://www.2shared.com/document/P927Y4Vm/scanned-doc-2.html
    2. In the Windows Task Manager, make sure there are no pre-existing Adobe processes running such as:
    AcrobatInfo.exe, Acrobat.exe, Acrotray.exe
    3. Open the PDF file you got in #1. Set zoom to 100%.
    4. Notice the visual quality. You will probably see blurry areas in the PDF. This matches Area 1 in this screen shot:
    http://img96.imageshack.us/img96/4113/adobeacrobatproblurbug.jpg
    5. Close the file by doing: File---> Close
    Do not exit the program. Go to Task Manager and verify that Acrobat.exe is already running.
    6. Open the file you got in #1, again. Zoom to 100% again.
    7. Notice now that the PDF does not have any blurry areas. What you see should match Area 2 in the same screenshot:
    http://img96.imageshack.us/img96/4113/adobeacrobatproblurbug.jpg
    -End-

    The choices in Bridge > Preferences > Advanced > International > Keyboard are limited, and they do not allow for choosing custom keyboard layouts.
    I need the custom keyboard layouts for a variety of reasons, such as being able to type in seven languages with my most used one without switching, two Russian layouts to allow for two non-standard ways of encoding Russian fonts, etc.

  • ADF 11 - Oracle Developer Day 28.05.2009 Online Tutorial Problem/Bug

    Hello
    I've downloaded the tutorial [http://events.unisfair.com/index.jsp?eid=394&seid=28] for the Developer Day scheduled for the 28.05.2009. [http://events.unisfair.com/index.jsp?eid=394&seid=28]
    I've completed the tutorial and discovered what would seem to be a bug.
    I've reproduced the problem in a new simpler application.
    Its a bit long but here we go.
    The situation is :
    Two panel splitters one inside the other, one vertical split and one horizontal split dividing the screen into a 3 parts, a left column and a right column split into a top and a bottom.
    ADF BC have been created using the Departmetns and Employees tables from the HR schema.
    In the left column there is an adf read only form bound to Departments with navigation controls.
    On the right at the top there is a read only table (with row selection) bound to the Employees view in the Departments view (master-detail)
    On the right at the bottom there is a form bound to the Employees view in the Departments view (master-detail)
    Using the left column read only form I navigate to Department 50 which has employees 120 to 199.
    The Employees af:Table shows employees 120 to 191 without scrolling.
    Using the scroll bar on the employee table I scroll to the bottom of the employees table (now employees 128 to 199 are showing)
    I then select on employee 198
    The form at the bottom right correctly positions on employee 198 however the employee table re-positions on employee 190 !
    Using the scroll bar I scroll to the bottom of the employees table (now employees 128 to 199 are showing)
    Employee 198 is selected.
    I select employee 199
    The form at the bottom right correctly positions on employee 199 however the employee table re-positions on employee 191 !
    I repeat the same process but selection employee 193
    The form at the bottom right correctly positions on employee 193 however the employee table re-positions on employee 185 !
    It would seem that the employee table scrolls up the exact number of rows that need to be scrolled down in order to show the last table row.
    Added to that when the tabel re-positions it would seem to be re-fetching its data...
    Can anybody explain what's going on or confirm the above observations?
    Regards
    Paul

    Hi,
    there is an attribute "displayRow" on the table to set what should be shown after refreshing the table. Set this to "selected"
    Frank

  • Video recording in iOS 6 problems / bug?

    I upgraded my iPhone 4S from iOS 6 beta 4 to the public release of iOS 6 last week.
    Since then, when i try to record a video using main camera app - i touch start record and its fine until i touch to stop recording.  It does not stop recording?  It shows recording time carrying on counting and freezes the record button.  I have to either way a long time for it to finally stop recording or exit (and kill sometimes) the app.  Then re enter camera app and it then is ok to record again.
    Is this a known bug? IS it linked to upgrading from iOS 6 beta to main iOS 6 released release?  How do i fix this?
    Thanks

    I have exact same problem on my 4s 64gb.
    Had very similar problems on ios 5.1.1, but would freeze the video after having pressed the record button to stop recording, the eventually the iphone would unfreeze, the video would eventually appear in the camera roll as a grey box, you then clicked on the video taken which was a grey background with QuickTime logo, you pressed play but no video would appear, but you could hear the audio.
    Now after ios 6 update, I have exact same problem as you, iPhone seems to get quite warm aswell once it has crashed!  The photo camera works fine though, and did do on 5.1.1.
    Apple say take phone back for a newly refurbished iphone, but didn't want to as I can live without it, Nd my phone is : months old and don't want an older phone!  I know there tested thoroughly, but my problem is that I paid £250 upfront on my phone contract to get 64gb and don't want a replacement, everything else works a treat on the phone, only video camera problems as you have now and symptoms as I have described above.
    No one in apple seem to know a fix, I read about jail breaking, but don't want to void my warranty!
    Does anyone know of a fix please, I've reset, restored, set up as a new phone, fresh ispw files, was told to wait by apple for ios 6 saying that that may fix the problem.
    When I read about the problems created by ios updates etc, why is it that people have such random issues, surely if we all have same phones, why is it we don't have very similar issues? Do each and every iPhone have a mind of its own FFS!
    I thought I'd trade my phone in an get a samsung galaxy S3, but iPhone 4S prices have slumped since release of iphone 5, I'm definitely not an iphone convert, I've always had htc! Very annoying problem with the video camera, which if you download another camcorder app it does exactly the same and freezes! I give up!
    Any updates on this would be great, to me and the person above, if I can find a fix it may restore my faith in apple products!
    Navarram1 - could you contact me possibly please if you come across a fix?  It would be greatly appreciated!

  • Compare / Reset Patch Problem, Bug?

    Hi
    in Mainstge 1 I assigned the nine drawbar controller of the NI B4 II Organ to 9 Faders in the Mainstage Layout, so I can control them with my Korg Nano Control.
    In MS 1 when ever I moved a drawbar I got the possibility to reset the patch, so the drawbars jump back to there saved value. In MS 2 this works too. But only for the EVB3, not for the B4 from Native instruments!!! So when I move the drawbars in the layout or on my Nano Kontrol MS 2 does not recognise the patch has changed. MS 2 only recognises the patch is changing, when I move the drawbars in the plugin Window from the B4 II with the mouse. That´s not feasible.
    So I thought, the workaround would be to go down und up one patch So the patch can reset to the saved value. Okay then the B4 Patch is set back so the saved value, and sounds like the saved value, but the 9 drawbars don´t takeover the value!!!! The stay at let´s say 000000000 but the sounding and saved value is 888800000. VERY ANNOYING. Anyone else experiencing this?
    regards
    myand

    I have the same problem. This is definitely a BEA bug. Once I set a field as null in XMLBean, the field is no longer "editable." If you edit a field which is set null previously, it will end up something like this:
    <log-name xsi:nil="true" xmlns="">log.txt</log-name>
    and parent.getLogName() will return null instead of "log.txt."
    Can anyone from BEA look into this problem?
    Thanks
    Roger

  • Airport problems (bug report)

    To put "the bottom-line up front", I'd like to know if anyone can put me in contact with Apple's Airport software engineers (or can forward this to them so a bug fix can be released). I have composed as detailed of a description of the bug as possible and all my attempted fixes.
    I've been having problems (for some time now) with my airport connection dying at seemingly random times, but most often within 5 minutes of re-booting. The indicator on the menu bar will show full signal, but I will not be able to even ping my router.
    This was not an issue until I installed Airport Update 4.2 (back in September). Shortly thereafter, I suspected the update was the problem, and did a complete re-install minus that update (and the ones reliant on it). Things then worked with no problems. I got brave and installed the update (in November) and since then the problems returned. I so far have not been willing to undertake another complete re-install.
    This is not an issue on my Jaguar partition, nor is it on a G4 that has a wired connection to the router, nor is it one on my brother's Powerbook G4, (running Tiger on a wireless connection). Running Fix Permissions and Fix Disk from Disk Utility has no effect, (including single-user boot with fsck). Resetting the router (and cable modem) has no effect.
    3rd-party software is ruled out. None was installed during my initial Panther installation when I first noticed the problem. Upgrading to Tiger is currently beyond my monetary means.
    For information, my router is a Linksys (802.11b) model BEFW11S4.

    hi there--
    your best bet for wanting your information to be shared is to call apple technical support at 1-800-275-2273. you can give a detailed report to a tech support agent, who will pass it along to the powers that be. you could also request to speak to an upper tier agent. then the report will be more likely to be handed over to apple engineering.

  • Sms problem bug with nokia 6710 navigator

    hi, i'm jack, surfer from italy. 
    the new kind of t9 with nokia navigator 6710 is really really bad, i'm searching to get the older one on this phone.
    the problem is that when you press * to change the word, the phone become slower, and open a new window where you can see the words and choose. this thing is really uncomfortable and make you really slower and harder to complete the sms.
    the big problem is that you can't enable or disable this option, you must use it! this is a very bad thing from nokia, cause people must choose their way to write sms.
    i can disable and enable t9, so why can't i enable and disable this option? this is a bug from nokia in this phone!
    please help me to find a patch, a software or something else to solve this problem, or if doesn't exist i need someone that advice nokia to put something to download on the site, to solve this problem.
    thank you

    1st of all dont store alot of text on phone this slows it down
    2nd try a soft reset this restores phone to out of box state the code is *#7370# security code is 12345 back up contacts and apps etc
    If  i have helped at all a click on the white star below would be nice thanks.
    Now using the Lumia 1520

  • Import Problems/Bug

    I normally have three versions of the same file in a folder - .NEF, .PSD and .TIF, all serving different purpose. Lightroom appears to be confused when importing and does not recognise two out of the three. In other words it only brings in one file and when I try to import all three and it tells me that the the file already exists.
    So I removed all but .NEF files from the folder and imported them again. No problems. I then copied all my .PSD and .TIF files back in and tried to import. Lightroom tells me that .NEF file already exists even though I am trying to import .TIF! Go figure... Looks like a bug, sounds like a bug, walks like a bug - must be a bug... :-(
    Regards,
    Peter

    Wrong. They can exist in he same folder. Just won't import at the same time that way. Try it. Import the two different extension files into separate folders then move them together. Thay are fine. LR just won't do it for you at this time.
    And there are lots of threads rehashing and dealing with this issue. So a little searching will get you what's what.
    Don
    Don Ricklin, MacBook 1.83Ghz Duo 2 Core, Pentax *ist D
    http://donricklin.blogspot.com/

  • Problem/bug with AIR 3.0

    Hi guys,
    I'm here again. I got this error when I tried to publish my project with AIR 3.0.. Actually, I've created an application usign AIR 2.6 (default comes with CS 5.5). It was used to get published and I used to update it on regular basis. Few days back I had to copy AIRSDK3 folder to Adobe's program files' folder, where I renamed AIR2.6 to anything else and AIRSDK3 to AIR2.6... Today, when I tried to publish my same project,  I got this following error. Hope that would help adobe (as it is beta version).
    (By the way, when I renamed the folders to their original names, it worked and published).

    Steve,
    We have seen the same thing and reported it to Forte. We have not yet
    heard back with a bug report number...
    For now, we have removed all comments from our sql code.
    Derk
    >
    We have just switched from version 2.0.H.1 to version 3.0.F.2 in development,
    and have discovered a bug with comments in SQL code.
    Anywhere in a cursor definition, or within SQL code in a method, if we use the
    multi-line comment format "/* ... */" even on a single line, then the code
    compiles fine, but crashes at runtime with a "Invalid SQL Command" error. It
    looks as though Forte is including the comment as part of the SQL!
    Has anyone else seen this problem? We have not found it in the known bugs list
    for 3.0.F.2 or the fixed bugs list for 3.0.G
    This worked fine for us prior to version 2, and if we don't get it fixed in
    Forte, it means a lot of rework to change the existing comments to single-line
    "// ..." format.
    Regards,
    Steve Isaac
    Senior Consultant, Information Services Group
    Hydro Electric Corporation of Tasmania
    4 Elizabeth St, Hobart, Australia, 7000
    Phone : +61 03 6230 5161
    e-mail: [email protected]
    Check out: http://mama.indstate.edu/users/sodana/lucado.html
    *** Derk Norton ***
    *** U S WEST Communications Voice : (303) 965-8772 ***
    *** 1801 California Street FAX : (303) 896-3565 ***
    *** Denver, Colorado 80202 Email : [email protected] ***
    **********************************************************************

  • XDK for java oracg.bat parameter problem/bug

    I have been having problems with generating java classes from my
    dtd when I noticed the following:
    @echo off
    set xdkparm=
    :loop
    if "%1"=="" goto end
    set xdkparm=%xdkparm% %1
    shift
    goto loop
    :end
    java oracle.xml.classgen.oracg %xdkparam%
    As you can see, the xdkparam var is used to invoke the classgen,
    whereas xdkparm var is used to collect the parameters...
    I changed the latter xdkparam to xdkparm, which lead to a
    different problem, but I think I am getting close.

    It is bug(#2157496) and will be fixed by next release.

  • JButton dispatchEvent problem

    Hi,
    I've got JButtons in a JTable which means I have to capture the mouse events and forward them to the button.
    I do this with a mouse listener on the table, and the lines:
    buttonEvent = (MouseEvent)SwingUtilities.convertMouseEvent(table, e, button);
    button.dispatchEvent(buttonEvent);
    System.out.println(buttonEvent);
    table.repaint();where 'e' is the original mouse event. This produces, for example:
    java.awt.event.MouseEvent[MOUSE_CLICKED,(145,167),button=1,modifiers=Button1,clickCount=1]
    on
    javax.swing.JButton[,0,0,0x0,invalid,alignmentX=0.0,alignmentY=0.5 <snip> text=Delete,defaultCapable=true]but yet nothing happens to the button. Is this a coordinate problem, or am I missing something else, as I don't really know what I'm doing?
    Cheers,
    Rob

    MOUSE_CLICKED,(145,167),Well I'm guessing that you can't just convert the table coordinates and use them as the button coordinates because the button isn't that big.
    An alternative approach might be to use the doClick() method of the button.
    In case that doesn't work, here's something I've been playing with that may help:
    import java.awt.*;
    import java.awt.event.*;
    import java.util.*;
    import javax.swing.*;
    import javax.swing.table.*;
    public class TableButton3 extends JFrame
         public TableButton3()
              String[] columnNames = {"Date", "String", "Integer", "Decimal", ""};
              Object[][] data =
                   {new Date(), "A", new Integer(1), new Double(5.1), "Delete1"},
                   {new Date(), "B", new Integer(2), new Double(6.2), "Delete2"},
                   {new Date(), "C", new Integer(3), new Double(7.3), "Delete3"},
                   {new Date(), "D", new Integer(4), new Double(8.4), "Delete4"}
              DefaultTableModel model = new DefaultTableModel(data, columnNames);
              JTable table = new JTable( model )
                   //  Returning the Class of each column will allow different
                   //  renderers to be used based on Class
                   public Class getColumnClass(int column)
                        return getValueAt(0, column).getClass();
              JScrollPane scrollPane = new JScrollPane( table );
              getContentPane().add( scrollPane );
              //  Create button column
              ButtonColumn buttonColumn = new ButtonColumn(table, 4);
         public static void main(String[] args)
              TableButton3 frame = new TableButton3();
              frame.setDefaultCloseOperation( EXIT_ON_CLOSE );
              frame.pack();
              frame.setVisible(true);
         class ButtonColumn extends AbstractCellEditor
              implements TableCellRenderer, TableCellEditor, ActionListener
              JTable table;
              JButton renderButton;
              JButton editButton;
              String text;
              public ButtonColumn(JTable table, int column)
                   super();
                   this.table = table;
                   renderButton = new JButton();
                   editButton = new JButton();
                   editButton.setFocusPainted( false );
                   editButton.addActionListener( this );
                   TableColumnModel columnModel = table.getColumnModel();
                   columnModel.getColumn(column).setCellRenderer( this );
                   columnModel.getColumn(column).setCellEditor( this );
              public Component getTableCellRendererComponent(
                   JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column)
                   if (hasFocus)
                        renderButton.setForeground(table.getForeground());
                         renderButton.setBackground(Color.WHITE);
                   else if (isSelected)
                        renderButton.setForeground(table.getSelectionForeground());
                         renderButton.setBackground(table.getSelectionBackground());
                   else
                        renderButton.setForeground(table.getForeground());
                        renderButton.setBackground(UIManager.getColor("Button.background"));
                   renderButton.setText( (value == null) ? "" : value.toString() );
                   return renderButton;
              public Component getTableCellEditorComponent(
                   JTable table, Object value, boolean isSelected, int row, int column)
                   text = (value == null) ? "" : value.toString();
                   editButton.setText( text );
                   return editButton;
              public Object getCellEditorValue()
                   return text;
              public void actionPerformed(ActionEvent e)
                   fireEditingStopped();
                   System.out.println( "Action: " + e.getActionCommand() );
    }

Maybe you are looking for