Please help me.... event handling on JComboBox...

hi all,
I have a combobox and i want a event to be fired for a single click on the down-arrow of the JComboBox. What i mean is its not the itemListener i am looking for. Only by a click on arrow i want a even to be fired. I tried using mouselistener. But the combobox ia not listening to this event. Please tell me how to achieve this?
thx,
-Soni.

thx a lot.....
it worked :)
Now i have one more doubt.
I am using a scroll pane and my event on this scroll pane is like this.
I have a text field inside the pane and when i press the up arrow of scroll pane the value(intger value) inside the text field increases and the other way for down arrow button.
i have just replaced ur code like this,
class ScrollUI extends BasicScrollPaneUI {
public JButton createDecreaseButton(int i) {
try {
     ImageIcon dayDownIcon = new ImageIcon("down.gif");
     JButton b = new JButton(dayDownIcon);
     b.addActionListener(new ActionListener() {
          public void actionPerformed(ActionEvent ae) {
               System.out.println("222");
     return b;
} catch (Exception e) {
e.printStackTrace();
return null;
and setting the UI like this:
JScrollPane pane= new JScrollPane(pp);
pane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
pane.getVerticalScrollBar().setUI(new ScrollUI());
but it throws error like this
setUI(javax.swing.plaf.ComponentUI) has protected access in javax.swing.JComponent
pane.getVerticalScrollBar().setUI(new ScrollUI());
what is the reason?
how to solve it...
plss....help..
-Soni

Similar Messages

  • Event handling between JComboBox & JCheckBox

    Hi.
    My problem is that when i click on the JCheckBox object, the code (i have) also executes the condition for JComboBox object. I assume there is a very simple solution, but i have yet to find it.
    This is the code i'm using:
         public void itemStateChanged(ItemEvent e){
              if(qcmCheckBox.isSelected()){
                   System.out.println("checkbox selected");
              if(e.getStateChange() == ItemEvent.SELECTED){
                   System.out.println("combo selected " + comboBoxOptions.getSelectedIndex());
         }My problem is, i think, that the e.getStateChange() is always returning true. I just haven't figured out a way to 'single out' when the JComboBox is selected.

    thanks for the tip, but that didn't exactly work.
    these are my steps:
    select second drop down option (out of 3)
    select checkbox
    deselect checkbox
    old output
    combo selected1
    qcm selected
    combo selected1new output (using instanceof)
    combo selected 1
    combo selected 1
    checkbox selected
    combo selected 1
    combo selected 1here's my code:
    // setting up vars
    private JCheckBox checkBox = new JCheckBox();
    private final String comboNames[] = {"Option 1", "Option 2", "Option 3"};
    private JComboBox comboBoxOptions = new JComboBox(comboNames);
    // combo box
    comboBoxOptions.addItemListener(this);
    // checkbox
    checkBox.addItemListener(this);
    // event handler
    public void itemStateChanged(ItemEvent e){
         if(checkBox.isSelected()){
              System.out.println("checkbox selected");
         //if(comboBoxOptions instanceof JComboBox){ // the suggested alternative
         if(e.getStateChange() == ItemEvent.SELECTED){
              System.out.println("combo selected " + comboBoxOptions.getSelectedIndex());
    }For some reason, the suggested answer gives me duplicate entries for the dropdown and it still gives me duplicate entries when i click on the checkbox.
    Again, what i'm trying to do is just get the checkbox not to execute the 2nd if statement "if(e.getStateChange() == ItemEvent.SELECTED){"
    I think the statement "e.getStateChange()" is returning everything true because its an event happening but i don't know a way to single the checkbox event.
    I would appreciate all the help I can get. Thanks.
    sijis

  • Event handling of JComboBox outside a JTable

    Hi to All,
    I've a question about JTables and JComboBoxes... I'm working on a application which holds a JTable and several JButtons and JCombBoxes. When the user clicks on a cell in the JTable, this cell will get the focus and the text will be highlighted. An action will be performed when the user clicks on a JButton (this just works fine). When the user clicks on a JComboBox also an action must be performed... but this won't work. I guess it won't work because of the JComboBox will draw a popup, and this popup will be cover the cell with the focus...
    I could not catch any event of the JComboBox...
    How can I check for a click on a JComboBox when an other component (JTable cell) has the focus?
    Thnx,

    Hi Swetha,
    Button controls in a table are available only in version 2.0 of the .NET PDK.
    In order to use Button in a table and handle its events u will have to upgrade.
    Further information about using input controls in a table is available in the How to section of the PDK documentation.
    Thanks, Reshef

  • Need Help with Event Handler Code - Doesnt come up in Event Handler Manager

    Hello there,
    Below is the code snippet that I am using to create a event handler:
    package com.oracle.events;
    import com.thortech.util.logging.Logger;
    import com.thortech.xl.client.events.tcBaseEvent;
    import com.thortech.xl.dataobj.tcDataObj;
    import com.thortech.xl.util.logging.LoggerModules;
    public class tcCheckOvrallProvStatusUDFs extends tcBaseEvent
         private static Logger logger = Logger.getLogger(LoggerModules.XL_JAVA_CLIENT);
         public tcCheckOvrallProvStatusUDFs()
              setEventName("Generating tcCheckOvrallProvStatusUDFs");
    * @Override
    * @throws Exception
         protected void implementation() throws Exception {
              tcDataObj data = getDataObject();
              String OIDProvStatus = data.getString("usr_udf_oidusrprovstatus");
    String EBSProvStatus = data.getString("usr_udf_ebstcausrprovstatus");
              if (OIDProvStatus.equals("Provisioned") && EBSProvStatus.equals("Provisioned")) {
                   setOverAllProvStatus(data);
         * @param data
         * @throws Exception
         private void setOverAllProvStatus(tcDataObj data) throws Exception
              data.setString("usr_udf_ovrrscprovstatus", "Provisioned");
    Its a simple code that I am using to populate value of a UDF field depending on the value of other 2 fields. I want to trigger it on Post-Insert and Post-Update events.
    But even if I restart the OIM server after placing the successfully compiled file (0 errors, 0 warnings) into the EventHandlers folder of OIM_HOME; it doesnt show up in the Design Console -> Development Tools -> Business Rule Definition -> Event Handler Manager. :( In order to create a event handler i need that file to show up in the lookup of event handlers/adapters. This JAR file doesnt come up over there.
    Is there anything missing within the code ?
    What else needs to be specified?
    Please provide some guidance.
    Thanks,
    - jhb.

    Now I have placed this JAR file in JAVATasks folder - made an entity adapter - in the event handler manager - i gave the class name/event handler name as 'setUDFValue' and the package as 'project5'. But now im getting it 'DOBJ.EVT_NOT_FOUND - Event Handler not found' error.
    package project5;
    import java.util.Hashtable;
    import Thor.API.Exceptions.tcAPIException;
    import java.util.Hashtable;
    import java.util.HashMap;
    import com.thortech.xl.util.config.ConfigurationClient;
    import Thor.API.tcResultSet;
    import Thor.API.tcUtilityFactory;
    import Thor.API.Operations.tcUserOperationsIntf;
    import java.lang.System;
    import Thor.API.Exceptions.tcUserNotFoundException;
    import java.util.Properties;
    import javax.mail.Message;
    import javax.mail.Session;
    import javax.mail.Transport;
    import javax.mail.internet.InternetAddress;
    import javax.mail.internet.MimeMessage;
    public class setUDFValue {
    private static final String SMTP_HOST_NAME="mail.smtp.host";
    public setUDFValue() {
    // public static void main(String[] args) {
    // setUDFValue.setvalue("jatinbhatt");
    // setUDFValue.sendemail("[email protected]","[email protected]");
    public static void setvalue(String UserID) {   
    try
    System.setProperty("XL.HomeDir", "F:/oim/oimserver/xellerate");
    System.setProperty("log4j.configuration",
    "F:/oim/oimserver/xellerate/config/log.properties");
    System.setProperty("java.security.policy",
    "F:/oim/oimserver/xellerate/config/xl.policy");
    System.setProperty("java.security.auth.login.config",
    "F:/oim/oimserver/xellerate/config/auth.conf");
    System.out.println("Startup...");
    System.out.println("Getting configuration...");
    ConfigurationClient.ComplexSetting config = ConfigurationClient.getComplexSettingByPath("Discovery.CoreServer");
    System.out.println("Login...");
    Hashtable env = config.getAllSettings();
    tcUtilityFactory ioUtilityFactory = new tcUtilityFactory(env,"xelsysadm","oimadmin1");
    System.out.println("Getting utility interfaces...");
    tcUserOperationsIntf moUserUtility = (tcUserOperationsIntf)ioUtilityFactory.getUtility("Thor.API.Operations.tcUserOperationsIntf");
    HashMap userMap = new HashMap();
    String str1 = null;
    String str2 = null;
    userMap.put("Users.User ID",UserID);
    userMap.put("Users.Status", "Active");
    tcResultSet userResultSet = null;
    try {
    userResultSet = moUserUtility.findAllUsers(userMap);
    } catch (tcAPIException e2) {
    // TODO Auto-generated catch block
    e2.printStackTrace();
    for (int i=0; i<userResultSet.getRowCount(); i++)
    userResultSet.goToRow(i);
    str1 = userResultSet.getStringValue("USR_UDF_OIDUSERPROV");
    str2 = userResultSet.getStringValue("USR_UDF_EBSUSERPROV");
    // System.out.println(userResultSet.getStringValue("USR_UDF_OIDUSERPROV"));
    // System.out.println(userResultSet.getStringValue("USR_UDF_EBSUSERPROV"));
    if (str1.equals("Provisioned") && (str2.equals("Provisioned") || str2.equals("NA")))
    userMap.put("USR_UDF_OVRRSCPROVSTATUS","Provisioned");
    moUserUtility.updateUser(userResultSet,userMap);
    moUserUtility.close();
    }catch (Exception e){
    e.printStackTrace();
    ERROR:
    ERROR RMICallHandler-63 XELLERATE.SERVER - Class/Method: tcDataObj/ runEvent encounter some problems: project5.setUDFValue
    java.lang.ClassCastException: project5.setUDFValue
         at com.thortech.xl.dataobj.tcDataObj.runEvent(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.eventPostUpdate(Unknown Source)
         at com.thortech.xl.dataobj.tcUSR.eventPostUpdate(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.update(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.save(Unknown Source)
         at com.thortech.xl.dataobj.tcTableDataObj.save(Unknown Source)
         at com.thortech.xl.ejb.beansimpl.tcUserOperationsBean.updateUserData(Unknown Source)
         at com.thortech.xl.ejb.beansimpl.tcUserOperationsBean.updateUser(Unknown Source)
         at com.thortech.xl.ejb.beans.tcUserOperationsSession.updateUser(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.evermind.server.ejb.interceptor.joinpoint.EJBJoinPointImpl.invoke(EJBJoinPointImpl.java:35)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.interceptor.system.TxRequiredInterceptor.invoke(TxRequiredInterceptor.java:50)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.interceptor.system.SecurityRoleInterceptor.invoke(SecurityRoleInterceptor.java:47)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.InvocationContextPool.invoke(InvocationContextPool.java:55)
         at com.evermind.server.ejb.StatelessSessionEJBObject.OC4J_invokeMethod(StatelessSessionEJBObject.java:87)
         at tcUserOperations_RemoteProxy_6ocop18.updateUser(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.evermind.server.rmi.RmiMethodCall.run(RmiMethodCall.java:53)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)
    Thanks,
    - jhb.

  • Please help : two events on one button

    Hi there
    I set up a simple Flash banner with the following code to click through  to a web page:
    function buttonClickHandler(event:MouseEvent):void {
    navigateToURL(new URLRequest("**URL**"));
    trace("You clicked me.");
    This worked fine, no problems.
    However, I was then asked to include a click counter by using this code:
    btn.buttonMode = true;
    btn.addEventListener(MouseEvent.CLICK, goOut);
    function goOut(e:Event){
    var url:String = root.loaderInfo.parameters.clickTag;
    var request:URLRequest = new URLRequest(**URL**);
    try {
    navigateToURL(request);
    catch (e:Error) {
    I've tried various ways to combine the two events, but it just doesn't  seem to work. I'm only used to one simple action at a time(!) and this  is needed urgently.
    Can anyone please help me resolve this problem? I will keep an eye on  the forum to update with any necessary info asked for.
    Many thanks in advance.

    You can just call two different functions by adding two listeners:
    btn.addEventListener(MouseEvent.CLICK, goOut);
    btn.addEventListener(MouseEvent.CLICK, buttonClickHandler);
    If you want to combine them though, you do have one error - the goOut function needs to accept a MouseEvent, not a regular Event:
    function goOut(e:MouseEvent){
    Also, you shouldn't need the root when grabbing the FlashVar:
    var url:String = loaderInfo.parameters.clickTag;
    You should put a trace in there to make sure it's working as expected.
    And you didn't really say what isn't working. Do you get any errors?

  • Please help on event listener (notified)

    i create a dynamic text field, i want it notified that, when
    got value send in the text field, then go to play another frame. i
    found some tag like event listener and text event . but i dun know
    how to used it.
    any expert got any suggestion or advice show me?

    Hi kglad,
    In AS3 watch method is removed.
    Can you please tell me how we can do the same in actionscript 3?
    Thanks,
    Shanthi

  • Help with Event Handling!

    I'm creating a program that is supposed to have a circle and a line disappear when mouse button is pressed, than when mouse button is released, reappear. My program is below, but I do not have a clue why it won't do anything when the mouse button is clicked. Thanks for the help.
    import objectdraw.*;
    import java.awt.*;
    public class NoClicking extends WindowController{
         FramedOval circle;
         Line diagonal;
    public void begin()
         new FramedOval( 153, 28, 94, 94, canvas);
         new Line( 167, 42, 233, 108, canvas);
    public void onMousePress(Location point)
    // When mouse button is depressed, the circle with diagonal line disappears.
    circle = new FramedOval( 153, 28, 94, 94, canvas);
         diagonal = new Line( 167, 42, 233, 108, canvas);
         circle.hide();
         diagonal.hide();
    public void onMouseRelease(Location point)
    // When mouse button is released, the circle with diagonal line reappears.
         circle.show();
         diagonal.hide();
    }

    Basic debugging. You are expecting that method onMousePress to be called when the mouse button is pressed, I assume. Well, is it being called? Run it through your IDE debugger or put in a System.out.println statement to confirm that it is or is not being called. That will tell you where to look next.
    I don't know what all of those classes are, but I would have expected "circle = new FramedOval(...)" to be in the begin() method and not in onMousePress. Otherwise you are creating a FramedOval in begin, which I assume is displayed, and then in onMousePress you create another FramedOval, which you then hide. That wouldn't hide the FramedOval you created in begin, would it? I'm just assuming that I know what your classes are supposed to do.

  • Please help me with handling PIPELINED

    I have written a function that returns rows of records details are as follows
    defined within package
    type calendar_tab is table of xx_bk_calendars ;
    defined within package body
    FUNCTION XX_BK_SP_LIST_CALENDAR(p_ProfileType IN VARCHAR2) RETURN calendar_tab PIPELINED IS
    -- declare variables to hold the values from the cursor
    lc_Profile_Value VARCHAR2(18);
    lc_fnd_profile VARCHAR2(18);
    lc_open_quote VARCHAR2(100);
    CURSOR cal_cursor IS
    SELECT calendarid
    ,externalsystemid
    ,calendarcode
    ,description
    ,maxdays
    ,mindays
    ,mintime
    ,lastcreationdate
    ,historydays
    FROM xx_bk_calendar;
    BEGIN
    IF (p_ProfileType = 'ALL') THEN
         FOR cal_rec in cal_cursor
         LOOP
              PIPE ROW (xx_bk_calendars(cal_rec.calendarid
    ,cal_rec.externalsystemid
    ,cal_rec.calendarcode
    ,cal_rec.description
    ,cal_rec.maxdays
    ,cal_rec.mindays
    ,cal_rec.mintime
    ,cal_rec.lastcreationdate
    ,cal_rec.historydays));
    EXIT WHEN cal_cursor%notfound;
    DBMS_OUTPUT.PUT_LINE('Calendar Code is ' ||cal_rec.calendarid );
         END LOOP;
    ELSE IF (p_ProfileType = 'SLOT') THEN
         FOR cal_slot in cal_cursor
         LOOP
    lc_Profile_Value := concat('XX_BK_',cal_slot.calendarcode);
    -- SELECT rtrim( fnd_profile.value('''||lc_Profile_Value||''')) INTO lc_fnd_profile FROM dual;
    lc_Profile_Value := rtrim(lc_Profile_Value);
    SELECT fnd_profile.value (lc_Profile_Value) INTO lc_fnd_profile FROM dual;
    lc_open_quote := 'SELECT ( fnd_profile.value rtrim('''||lc_Profile_Value||''')) INTO lc_fnd_profile FROM dual';
    DBMS_OUTPUT.PUT_LINE( lc_open_quote);
    DBMS_OUTPUT.PUT_LINE('FND_Profile Value is '||lc_fnd_profile);
    -- DBMS_OUTPUT.PUT_LINE('Passed in profile Type '||p_ProfileType);
    -- DBMS_OUTPUT.PUT_LINE('X_Profile value is '||lc_Profile_Value);
         IF (lc_fnd_profile = 'SLOT') THEN
         --DBMS_OUTPUT.PUT_LINE('FND_Profile Value is '||ln_fnd_profile);
    --DBMS_OUTPUT.PUT_LINE('Passed in profile Type '||p_ProfileType);
    PIPE ROW (xx_bk_calendars(cal_slot.calendarid
    ,cal_slot.externalsystemid
    ,cal_slot.calendarcode
    ,cal_slot.description
    ,cal_slot.maxdays
    ,cal_slot.mindays
    ,cal_slot.mintime
    ,cal_slot.lastcreationdate
    ,cal_slot.historydays));
    END IF;
         END LOOP;
    ELSE
         FOR cal_full IN cal_cursor
         LOOP
    lc_Profile_Value := concat('XX_BK_',cal_full.calendarcode);
    -- SELECT rtrim( fnd_profile.value('''||lc_Profile_Value||''')) INTO lc_fnd_profile FROM dual;
    lc_Profile_Value := rtrim(lc_Profile_Value);
    SELECT fnd_profile.value (lc_Profile_Value) INTO lc_fnd_profile FROM dual;
    lc_open_quote := 'SELECT ( fnd_profile.value rtrim('''||lc_Profile_Value||''')) INTO lc_fnd_profile FROM dual';
    DBMS_OUTPUT.PUT_LINE( lc_open_quote);
    DBMS_OUTPUT.PUT_LINE('FND_Profile Value is '||lc_fnd_profile);
    -- DBMS_OUTPUT.PUT_LINE('Passed in profile Type '||p_ProfileType);
    -- DBMS_OUTPUT.PUT_LINE('X_Profile value is '||lc_Profile_Value);
    IF (lc_fnd_profile = 'SLOT') OR (lc_fnd_profile = 'FULL') THEN
         -- DBMS_OUTPUT.PUT_LINE('FND_Profile Value is '||ln_fnd_profile);
    -- DBMS_OUTPUT.PUT_LINE('Passed in profile Type '||p_ProfileType);
         PIPE ROW (xx_bk_calendars(cal_full.calendarid
    ,cal_full.externalsystemid
    ,cal_full.calendarcode
    ,cal_full.description
    ,cal_full.maxdays
    ,cal_full.mindays
    ,cal_full.mintime
    ,cal_full.lastcreationdate
    ,cal_full.historydays));
    END IF;
         END LOOP;
    END IF;
    END IF;
    RETURN;
    END XX_BK_SP_LIST_CALENDAR;
    object definition
    CREATE type xx_bk_calendars as object (
    CALENDARID NUMBER
    ,EXTERNALSYSTEMID NUMBER
    ,CALENDARCODE VARCHAR2(12)
    ,DESCRIPTION VARCHAR2(30)
    ,MAXDAYS NUMBER
    ,MINDAYS NUMBER
    ,MINTIME DATE
    ,LASTCREATIONDATE DATE
    ,HISTORYDAYS NUMBER
    Please can you tell me how I can use Jave or JDBC or DAO to display the return value of this function?

    Adebayo,
    Search for words ARRAY and STRUCT in this forum's archives.
    Good Luck,
    Avi.

  • Using odc:tabbedPanel   : event handling ?

    Hi ,
    I am using <odc:tabbedPanel> for tabs , need some help on event handling when we click on any tab by using <odc:tabbedPanel>
    When tan is getting loaded want to do some server side coding , Any body has any idea on this ?
    Thanks,
    ....

    Hi BalusC,
    Little more details
    I am using <odc:tabbedPanel> it has two tabs(Select tools , Change order ) , The first tab contains list of check boxes(<h:selectBooleanCheckbox ) , the second tab contains list box(<h:selectOneListbox) , it has all checked values from the first tab.
    If I select/deselcet any checkbox from the first tab with out submitting , the same values needs to be shared to the second tab . based on this user can save/cancel his preferences..
    So I need to do some action when Iclick on second tab , I don't see any action/valuchanged event on <odc:bfPanel> .
    Can you please let me know how this can be achieved.
    Thanks in advance...

  • Why event handler runs after reconcilliation

    Hello,
    I had done flat-file full reconcilliation where users mentioned in file are inserted in OIM but before
    starting my reconcilliaiton task i had created an event handler as seperate task whose purpose was to write
    group name,userid,first name & last name to log file when some group is assigned to some user,but
    during my reconcilliation task i came to know that my above event handler is also executed ,so anybody
    can please clarify how event handler is executed during reconcilliation ?
    Thank-You
    Rahul Shah

    Thanks for information Sunny,but i am facing some issue i.e i want to update mail & userid using first & last name after reconcilliation is done ,so first i did with entity adapter & it works fine,but when i tried with event handler its not working & i also tried both ways i.e pre-insert & post-insert.

  • Audition 3 Stop Working When I Tried Too Switch Too ASIO Audio Driver... Please Help

    Problem signature
    Problem Event Name: APPCRASH
    Application Name: Audition.exe
    Application Version: 3.0.7283.0
    Application Timestamp: 470d9498
    Fault Module Name: kernel32.dll
    Fault Module Version: 6.0.6001.18215
    Fault Module Timestamp: 49953395
    Exception Code: e06d7363
    Exception Offset: 000442eb
    OS Version: 6.0.6001.2.1.0.768.3
    Locale ID: 1033
    Additional Information 1: 1739
    Additional Information 2: 3c3cf0b351726b85a2b6d24ff0a86110
    Additional Information 3: 7d1c
    Additional Information 4: 1d1d64b872c793392285053bf8183ae1
    Extra information about the problem
    Bucket ID: 1232267440

    When i try to switch my audio driver to ASIO Audio  Driver in  Audition 3.0.  It Stops Working and when i go to Problem Reports and Solution.. Its Tell Me Something about the Fault Module Name: kernel32.dll    and the rest is below.. I Am using Mbox2 Mini and its Driver 7.4v
    I Dont Know how to get it working again so could u help.. you can reach me on yahoo messenger at : [email protected]  please help
    Problem Event Name: APPCRASH
    Application Name: Audition.exe
    Application Version: 3.0.7283.0
    Application Timestamp: 470d9498
    Fault Module Name: kernel32.dll
    Fault Module Version: 6.0.6001.18215
    Fault Module Timestamp: 49953395
    Exception Code: e06d7363
    Exception Offset: 000442eb
    OS Version: 6.0.6001.2.1.0.768.3
    Locale ID: 1033
    Additional Information 1: 1739
    Additional Information 2: 3c3cf0b351726b85a2b6d24ff0a86110
    Additional Information 3: 7d1c
    Additional Information 4: 1d1d64b872c793392285053bf8183ae1
    Extra information about the problem
    Bucket ID: 1232267440
    I Dont Know how to get it working again so could u help.. you can reach me on yahoo messenger

  • Have "ZOOM" function in the map???Please help me~~

    in my project , in need write a map of a building.
    i would like to use zoom fucntion to let user to look into the room number in the box instead of room
    do the j2me have this function and how to implement ??
    please help
    urgent event~~~thz a lot

    in my project , in need write a map of a building.
    Sounds like you are working with graphics, not collections
    i would like to use zoom fucntion to let user to look
    into the room number in the box instead of room
    Yeah, sounds like you need to be posting in the Java2D forums
    do the j2me have this function and how to implement
    I'm sure there are 2D graphics calls you can make in J2ME. You basically need to get the subimage or subsection of the original image, then scale it to the size of the canvas and redraw.

  • Event Handling Help needed please.

    Hi,
    I am writing a program to simulate a supermarket checkout. I have done the GUI and now i am trying to do the event handling. I have come up against a problem.
    I have a JCombobox called prodList and i have added an string array to it called prods . I have also created 2 more arrays with numbers in them.
    I want to write the code for if an item is selected from the combo box that the name from the array is shown in a textfield tf1, and also the price and stock no which correspond to the seclected item (both initialised in the other arrays) are also added to the textfield tf1.
    I have started writng the code but i am really stuck. Could someone please help me with this please. The code i have done so far is as follows(just the event handling code shown)
              public void ItemStateChange(ItemEvent ie){
              if(ie.getItemSelected()== prodList)
                   changeOutput();
              public void changeOutput()
                   if(ItemSelected ==0)
                        tf1.setText("You have selected" +a +b +c);
         }

    Do you say this because i missed the d of ItemStateChanged ?
    I have amended that but still i am getting the same errors class or enum expected. 4 of them relating to the itemStateChanged method.
    i will post my whole code if it helps
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.util.Observer;  //new
    import java.util.Observable;//new
    import javax.swing.BorderFactory;
    import javax.swing.border.Border;
    import javax.swing.border.TitledBorder;
    public class MySuperMktPro
         public MySuperMktPro()
              CheckoutView Check1 = new CheckoutView(1,0,0);
              CheckoutView Check2 = new CheckoutView(2,300,0);
              CheckoutView Check3 = new CheckoutView(3,600,0);
              CheckoutView Check4 = new CheckoutView(4,0,350);
              CheckoutView Check5 = new CheckoutView(5,600,350);
              OfficeView off111 = new OfficeView();
        public static void main(String[] args) {
             // TODO, add your application code
             System.out.println("Starting My Supermarket Project...");
             MySuperMktPro startup = new MySuperMktPro();
        class CheckoutView implements ItemListener , ActionListener
        private OfficeView off1;
         private JFrame chk1;
         private Container cont1;
         private Dimension screensize,tempDim;
         private JPanel pan1,pan2,pan3,pan4,pan5;
         private JButton buyBut,prodCode;
         private JButton purchase,cashBack,manual,remove,disCo;
         private JButton but1,but2,finaLi1,but4,but5,but6;
         private JTextArea tArea1,tArea2;
         private JTextField tf1,tf2,tf3,list2;
         private JComboBox prodList;
         private JLabel lab1,lab2,lab3,lab4,lab5,lab6,lab7;
         private int checkoutID; //New private int for all methods of this class
         private int passedX,passedY;
         private String prods[];
         private JButton rb1,rb2,rb3,rb4;
         private double price[];
         private int code[];
         public CheckoutView(int passedInteger,int passedX,int passedY)
              checkoutID = passedInteger; //Store the int passed into the method
            this.passedX = passedX;
            this.passedY = passedY;
              drawCheckoutGui();
         public void drawCheckoutGui()
              prods= new String[20];
              prods[0] = "Beans";
              prods[1] = "Eggs";
              prods[2] = "bread";
              prods[3] = "Jam";
              prods[4] = "Butter";
              prods[5] = "Cream";
              prods[6] = "Sugar";
              prods[7] = "Peas";
              prods[8] = "Milk";
              prods[9] = "Bacon";
              prods[10] = "Spaghetti";
              prods[11] = "Corn Flakes";
              prods[12] = "Carrots";
              prods[13] = "Oranges";
              prods[14] = "Bananas";
              prods[15] = "Snickers";
              prods[16] = "Wine";
              prods[17] = "Beer";
              prods[18] = "Lager";
              prods[19] = "Cheese";
              for(i=0; i<prods.length;i++);
              code = new int [20];
              code[0] = 1;
              code[1] = 2;
              code[2] = 3;
              code[3] = 4;
              code[4] = 5;
              code[5] = 6;
              code[6] = 7;
              code[7] = 8;
              code[8] = 9;
              code[9] = 10;
              code[10] = 11;
              code[11] = 12;
              code[12] = 13;
              code[13] = 14;
              code[14] = 15;
              code[15] = 16;
              code[16] = 17;
              code[17] = 18;
              code[18] = 19;
              code[19] = 20;
              for(b=0; b<code.length; b++);
              price = new double [20];
              price[0] = 0.65;
              price[1] = 0.84;
              price[2] = 0.98;
              price[3] = 0.75;
              price[4] = 0.45;
              price[5] = 0.65;
              price[6] = 1.78;
              price[7] = 1.14;
              price[8] = 0.98;
              price[9] = 0.99;
              price[10] = 0.98;
              price[11] = 0.65;
              price[12] = 1.69;
              price[13] = 2.99;
              price[14] = 0.99;
              price[15] = 2.68;
              price[16] = 0.89;
              price[17] = 5.99;
              price[18] = 1.54;
              price[19] = 2.99;
              for(c=0; c<code.length; c++);
              screensize = Toolkit.getDefaultToolkit().getScreenSize();
              chk1 = new JFrame();
              chk1.setTitle("Checkout #" + checkoutID); //Use the new stored int
              chk1.setSize(300,350);
              chk1.setLocation(passedX,passedY);
              chk1.setLayout(new GridLayout(5,1));
              //chk1.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              cont1 = chk1.getContentPane();
              //chk1.setLayout(new BorderLayout());
                 pan1 = new JPanel();
                 pan2 = new JPanel();
              pan3 = new JPanel();
              pan4 = new JPanel();
              pan5 = new JPanel();
              //panel 1
              pan1.setLayout(new FlowLayout());
              pan1.setBackground(Color.black);          
              prodList = new JComboBox(prods);
              prodList.setMaximumRowCount(2);
              prodList.addItemListener(this);
              but1 = new JButton("Buy");
              but1.addActionListener(this);
              lab1 = new JLabel("Products");
              lab1.setForeground(Color.white);
              lab1.setBorder(BorderFactory.createLineBorder(Color.white));
              pan1.add(lab1);
              pan1.add(prodList);          
              pan1.add(but1);
              //panel 2
              pan2 = new JPanel();
              pan2.setLayout(new BorderLayout());
              pan2.setBackground(Color.black);
              lab3 = new JLabel("                                Enter Product Code");
              lab3.setForeground(Color.white);
              tArea2 = new JTextArea(8,10);
              tArea2.setBorder(BorderFactory.createLineBorder(Color.white));
              lab5 = new JLabel("  Tesco's   ");
              lab5.setForeground(Color.white);
              lab5.setBorder(BorderFactory.createLineBorder(Color.white));
              lab6 = new JLabel("Checkout");
              lab6.setForeground(Color.white);
              lab6.setBorder(BorderFactory.createLineBorder(Color.white));
              lab7 = new JLabel("You  selected                      ");
              lab7.setForeground(Color.cyan);
              //lab7.setBorder(BorderFactory.createLineBorder(Color.white));
              pan2.add(lab7,"North");
              pan2.add(lab6,"East");
              pan2.add(tArea2,"Center");
              pan2.add(lab5,"West");
              pan2.add(lab3,"South");
              //panel 3
              pan3 = new JPanel();
              pan3.setLayout(new FlowLayout());
              pan3.setBackground(Color.black);
              manual = new JButton("Manual");
              manual.addActionListener(this);
              manual.setBorder(BorderFactory.createLineBorder(Color.white));
              remove = new JButton("Remove");
              remove.addActionListener(this);
              remove.setBorder(BorderFactory.createLineBorder(Color.white));
              tf1 = new JTextField(5);
              pan3.add(manual);
              pan3.add(tf1);
              pan3.add(remove);
              //panel 4
              pan4 = new JPanel();
              pan4.setLayout(new FlowLayout());
              pan4.setBackground(Color.black);
              finaLi1 = new JButton("Finalise");
         //     finaLi1.addActionListener(this);
              cashBack = new JButton("Cashback");
              JTextField list2 = new JTextField(5);
              but4 = new JButton(" Sum Total");
              but4.addActionListener(this);
              but4.setBorder(BorderFactory.createLineBorder(Color.white));
              cashBack.setBorder(BorderFactory.createLineBorder(Color.white));
              pan4.add(cashBack);
              pan4.add(list2);
              pan4.add(but4);
              //panel 5
              pan5 = new JPanel();
              pan5.setLayout(new GridLayout(2,3));
              pan5.setBackground(Color.black);
              disCo = new JButton("Discount");
              disCo.addActionListener(this);
              disCo.setBorder(BorderFactory.createLineBorder(Color.black));
              but6 = new JButton("Finalise");
              but6.addActionListener(this);
              but6.setBorder(BorderFactory.createLineBorder(Color.black));
              rb1 = new JButton("Cash");
              rb1.addActionListener(this);
              rb1.setBorder(BorderFactory.createLineBorder(Color.black));
              rb2 = new JButton("Card");
              rb2.addActionListener(this);
              rb2.setBorder(BorderFactory.createLineBorder(Color.black));
              rb3 = new JButton("Cheque");
              rb3.addActionListener(this);
              rb3.setBorder(BorderFactory.createLineBorder(Color.black));
              rb4 = new JButton("Voucher");
              rb4.addActionListener(this);
              rb4.setBorder(BorderFactory.createLineBorder(Color.black));
              pan5.add(disCo);
              pan5.add(but6);
              pan5.add(rb1);
              pan5.add(rb2);
              pan5.add(rb3);
              pan5.add(rb4);
              //add the panels to the container        
              cont1.add(pan1);
              cont1.add(pan4);     
              cont1.add(pan2);
              cont1.add(pan3);          
              cont1.add(pan5);          
              chk1.setContentPane(cont1);
              chk1.setVisible(true);     
    class OfficeView
         private OfficeView off111;
         private JFrame offMod1;
         private JPanel pane1;
         private JButton refill;
         private Container cont11;
         private Dimension screensize;
         private JTextField tf11,tf12;
         public OfficeView()
              drawOfficeGUI();
         public void drawOfficeGUI()
              screensize = Toolkit.getDefaultToolkit().getScreenSize();
              offMod1 = new JFrame("Office Control");
              int frameWidth = 300;
              int frameHeight = 250;
              offMod1.setSize(frameWidth,frameHeight);
              offMod1.setLocation(300,350);
              offMod1.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              cont11 = offMod1.getContentPane();
              pane1 = new JPanel();
              pane1.setBackground(Color.cyan);
              refill = new JButton("Refill");
              tf11 = new JTextField(25);
              tf12 = new JTextField(25);
              pane1.add(tf11);
              pane1.add(refill);
              pane1.add(tf12);
              cont11.add(pane1);
              offMod1.setContentPane(cont11);
              offMod1.setVisible(true);
              public void ItemStateChanged(ItemEvent ie)
                        if(ie.getItemSelected()== prodList)
                                  changeOutput();
              public void changeOutput()
                        if(ItemSelected ==0)
                                  tf1.setText("You have selected", +a +b +c);
                   }Message was edited by:
    fowlergod09

  • Button Event Handler in a JList, Please help.

    Hi everyone,
    I have created a small Java application which has a JList. The JList uses a custom cell renderer I named SmartCellRenderer. The SmartCellRenderer extends JPanel and implements the ListCellRenderer. I have added two buttons on the right side inside the JPanel of the SmartCellRenderer, since I want to buttons for each list item, and I have added mouse/action listeners for both buttons. However, they don't respond. It seems that the JList property overcomes the buttons underneath it. So the buttons never really get clicked because before that happens the JList item is being selected beforehand. I've tried everything. I've put listeners in the Main class, called Editor, which has the JList and also have listeners in the SmartCellRenderer itself and none of them get invoked.
    I also tried a manual solution. Every time the event handler for the JList was invoked (this is the handler for the JList itself and not the buttons), I sent the mouse event object to the SmartCellRenderer to manually check if the point the click happened was on one of the buttons in order to handle it.
    I used:
    // Inside SmartCellRenderer.java
    // e is the mouse event object being passed from the Editor whenever
    // a JList item is selected or clicked on
    Component comp = this.getComponent (e.getX(), e.getY())
    if(!(comp instanceof JButton)) {
              System.out.println("Recoqnized Event, but not a button click...");
              //return;
    } else {
              System.out.println("Recognized Event, IT IS A MOUSE CLICK, PROCESSING...");
              System.out.println("VALUE: "+comp.toString());
    What I realized is that not only this still doesn't work (it never realizes the component as a JButton) it also throws an exception for the last line saying comp is null. Meaning with the passed x,y position the getComponent() returns a null which happens when the coordinates passed to it are outside the range of the Panel. Which is a whole other problem?
    I have yet to find an example on the web, using Google, that demonstrated using buttons inside a JList.
    Can anyone help me with this. Thanks.

    A renderer is not a component, so you can't click on it. A renderer is just used to paint a representation of a component at a certain position in your JList.
    I have yet to find an example on the web, using Google, that demonstrated using buttons inside a JList.Thats probably because this is not a common design. The following two designs are more common:
    a) Create a separate panel for your JButtons. Then when you click on the button it would act on each selected row in the JList
    b) Or maybe like windows explorer. Select the items in the list and then use a JPopupMenu to perform the desired functionality.
    I've never tried to add a clickable button to a panel, but this [url http://forum.java.sun.com/thread.jspa?threadID=573721]posting shows one way to add a clickable JButton as a column in a JTable. You might be able to use some of the concepts to add 2 button to the JPanel or maybe you could use a JTable with 3 columns, one for your data and the last two for your buttons.

  • Event Handler for a JComboBox in JTable

    Hi,
    I am using a JTable with one column having JComboBox as CellEditor, I Want to handle event for jcomboBox such that if I am selecting any item from JcomboBox item , i check if there is any field before that in the Jtable Cell if yes then I am setting it to null or the previous value. I have implemented CellEditorListener to it but it is not working fine, so if anyone can please help me out..

    If I read you right, you want to use a multiple keystroke combo box as an editor in a JTable?
    If you create the JComboBox as you would like it and then install it as an editor in the column(s) JTable the editor will work like the JComboBox
    Example:
    //- you would have that keyselection Manager class
    // This key selection manager will handle selections based on multiple keys.
    class MyKeySelectionManager implements JComboBox.KeySelectionManager {    ....    };
    //- Create the JComboBox with the multiple keystroke ability
    //- Create a read-only combobox
    String[] items = {"Ant", "Ape", "Bat", "Boa", "Cat", "Cow"};
    JComboBox cboBox = new JComboBox(items);
    // Install the custom key selection manager
    cboBox.setKeySelectionManager(new MyKeySelectionManager());
    //- combo box editor for the JTable
    DefaultCellEditor cboBoxCellEditor = new DefaultCellEditor(cboBox);
    //- set the editor to the specified COlumn in the JTable - for example the first column (0)
    tcm.getColumn(0).setCellEditor(cboBoxCellEditor); Finally, it may be necessary to to put a KeyPressed listener for the Tab key, and if you enter the column that has the JComboBox:
    1) start the editting
    table.editCellAt(row, col);2) get the editor component and cast it into a JComboBox (in this case)
    Component comp = table.getEditorComponent();
    JComboBox cboComp = (JComboBox) comp;3) give this compent the foucus to do its deed     
    cboComp.requestFocus();Hope this helps!
    dd

Maybe you are looking for

  • How do i reinstall photos back into iphoto5?

    I accidentally messed up my photo library and had to erase it to start again. I have a complete back up reinstalled on the hard drive, but dont know how to get the computer to recognize the folder and load the pictures so that i can see them when i o

  • Set default value for full name based on usename

    I have an LOV which as the full name of the user, for example 'John Smith'. I would like to set the value of this LOV to the full name of the user, based on a match with username. So when JSMITH is logged in, I would like the default value of the LOV

  • BO Universe/webi

    Dear all, Please   help in following issues. we  have concepts like  calculated keffigure,restricted keyfigure,exceptions,condtions,Customer exits  in sap bw . how this can be achived in universe and webi. Thanks and Regards suresh.p

  • No image for username!!

    I have uploaded a photo for my username but it does not show against my username. Can anyone please advise??

  • DNS Root Hints

    hello guys, i had a windows 2012 and windows 2008 as DC's of course with DNS installed on both of them. The two DC's uses root hints for DNS. (NO forwarder) No changes made for over a year. We have a hardware firewall, configured as DHCP. The DNS IP