How to deal with the rule that do not use "object" class to declear a class

I run my flex project in sonar. And there is a rule "Do not use Object class ".
I just want to know how to deal with this problem.
I mean, when I try to write a base class, I don't know which kind of class will be transfered in by reference, which type I can declear instead of "object"?

Check out this example:
The moment I put in the code >> box1.addItem("hello"); << and run the application, the BusNameListener is fired. Hope this makes sense.
import java.awt.*;
import javax.swing.*;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
public class JFrameExample {
private JComboBox box1;
public JFrameExample() {
box1 = new JComboBox();
box1 .setMinimumSize(new Dimension(300, 24));
box1 .setPreferredSize(new Dimension(300, 24));
box1.addActionListener(new BusNameListener());
box1.addItem("hello");
JFrame f = new JFrame("This is a test");
f.setSize(400, 150);
Container content = f.getContentPane();
// content.setBackground(Color.white);
content.setLayout(new FlowLayout());
content.add(box1);
f.setVisible(true);
class BusNameListener implements ActionListener {
public void actionPerformed(ActionEvent e) {
JComboBox cb = (JComboBox) e.getSource();
String item = (String) cb.getSelectedItem();
if (item != null) {
JOptionPane.showInputDialog(null,
"Specify...", "File Import",
JOptionPane.OK_CANCEL_OPTION);
}

Similar Messages

  • How to deal with the rejected stock if it is rjected by QC

    Dear All,
    please let me know how to deal with the rejected  stock from Quality point of view.i.e., for incoming materails and Finished if returned from customer
    Regards,
    P.Vijaya

    hi
    if material is rejected for incoming material then you can create Notification for incoming material due to  you can return back material with print for that you have to record defects in result recording. in T-code QM02 if result is recorded with defects. or you can create with Qm01.against vendor
    if material is returned from costumer you can create inspection lot for that for that you have to maintained inspection type 06 in material master. you can result record for that you can create notification for that. or rework for this material as per quality check or can scrap
    if have any problem please come back
    regards
    Pravin

  • How you deal with the situation if the vendor/supplier is also a customer ?

    Dear All,
    Could you please help me with the idea on how to deal with the suppliers/vendors who also are customers to you in MM?
    Thanks in advance,
    Ranjan

    It depends what you are intentions are..
    However
    1. Create a customer master record for that vendor that is also a customer.
    2. Enter Vendor number in Vendor field in control data-customer master record.
    3. Enter customer number in Customer field in Control data- vendor master record
    Finally, Check "Clrg with vend." field or "Clrg with cust." field

  • How to deal with the situation when the database change into ms-sqlserver ?

    Hi,dear all,
    How to deal with the situation when the database change into ms-sqlserver or other database?
    Now, i want to build a j2ee project with ORACLE ADF bc,but this project may be used in several diffrent databases for example oracle db,ms db,mysql and so on.however,if i have developer this project in jdeveloper and this project connection was config as a oracle database,and then,can this project be reused for other databases espasially including the model codes? if yes,how should i do?
    all who know how to resolve this,tell me pls,thanks.
    bruce Li,
    China
    Message was edited by:
    user526724

    Hi Paulbin,
    Do you want to supply a function-pointer to a DLL so it can call[back] your VI?  Here's how it can be done with .NET, though, that solution requires a C compiler.   A single "VI_to_function-reference" utility could handle all cases where the callback passes no parameters.  Maybe someday somebody will share that dll.
    Did you know that LabVIEW can use Events for some COM-signals change?  See pic.  (Note: DTR is not listed - - )
    Another question is another function's prototype is WORD SetTestType(WORD comHandle, bool type1, bool type2, bool type3),   I tried to use a boolean control and a Boolean to (0,1) node in labVIEW to pass parameters to CLF, I config the bool input value as U8(according to C++ bool type) and U32(according to WIN32 BOOL type), it dose not help, when I execute the VI, LabVIEW will be disappeare, it seems to be closed, I must start it again.
    Could someone has similar experience on this points?
    It's easy to crash LabVIEW misusing CLF - maybe there's another reason for the crash besides bool mis-match(?)  Do you know which "Calling convention" is required?  What type is comHandle? (where does comHandle come from?) 
    Cheers!
    Message Edited by tbd on 03-23-2007 09:34 PM
    Message Edited by tbd on 03-23-2007 09:35 PM
    "Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)
    Attachments:
    evt.jpg ‏7 KB

  • How to deal with the depth testing of Iterator Patch?

    Recently I use Iterator Path to make my effect. I met some problem. I couldn't deal with the Sprite depth testing. I found it useless to set depth testing of the Sprite Patch. And also I don't know how to deal with the layer of the subpatch in Iterator.

    rp0428 wrote:
    All you can do is remove any reference to it:
    myGame = null;If that was the last reference then it will be eligible for garbage collection and it MAY be collected.And note that there's rarely a good reason to do this. In most cases, simply letting things go out of scope when the method that uses them ends is sufficient. About the only time you need to explicitly set something to null like this is, for example, if you're implementing a collection class and you want to remove an entry.

  • How to deal with the change in address of plant,

    how to deal with the change in address of plant,companycode,sales org etc.?

    Hi,
    Do you want to change the address of Company code, Plant and Sales org?
    Follow the menu path in SPRO.
    SPRO >> Enterprise structure >> Definition >> Financial accounting >> Define Company code >> Edit company code >> Click on address and change.
    .. Definition >> Sales and Distribution >>  Define ...sales org >> select the sales org and click on address and change.
    ... Definition >> Logistics - general >> Plant >>>> Click on address and change.
    Regards,
    K Bharathi

  • How to finish with the sites that open aleatory on safari

    how to finish with the sites that open aleatory on safari?

    There is no need to download anything to solve this problem. You may have installed the "VSearch" trojan, perhaps under a different name. Remove it as follows.
    Malware is constantly changing to get around the defenses against it. The instructions in this comment are valid as of now, as far as I know. They won't necessarily be valid in the future. Anyone finding this comment a few days or more after it was posted should look for more recent discussions or start a new one.
    Back up all data before proceeding.
    Step 1
    From the Safari menu bar, select
              Safari ▹ Preferences... ▹ Extensions
    Uninstall any extensions you don't know you need, including any that have the word "Spigot," "Trovi," or "Conduit" in the description. If in doubt, uninstall all extensions. Do the equivalent for the Firefox and Chrome browsers, if you use either of those.
    Reset the home page and default search engine in all the browsers, if it was changed.
    Step 2
    Triple-click anywhere in the line below on this page to select it:
    /Library/LaunchAgents/com.vsearch.agent.plist
    Right-click or control-click the line and select
              Services ▹ Reveal in Finder (or just Reveal)
    from the contextual menu.* A folder should open with an item named "com.vsearch.agent.plist" selected. Drag the selected item to the Trash. You may be prompted for your administrator login password.
    Repeat with each of these lines:
    /Library/LaunchDaemons/com.vsearch.daemon.plist
    /Library/LaunchDaemons/com.vsearch.helper.plist
    /Library/LaunchDaemons/Jack.plist
    Restart the computer and empty the Trash. Then delete the following items in the same way:
    /Library/Application Support/VSearch
    /Library/PrivilegedHelperTools/Jack
    /System/Library/Frameworks/VSearch.framework
    ~/Library/Internet Plug-Ins/ConduitNPAPIPlugin.plugin
    Some of these items may be absent, in which case you'll get a message that the file can't be found. Skip that item and go on to the next one.
    This trojan is distributed on illegal websites that traffic in pirated content. If you, or anyone else who uses the computer, visit such sites and follow prompts to install software, you can expect much worse to happen in the future.
    You may be wondering why you didn't get a warning from Gatekeeper about installing software from an unknown developer, as you should have. The reason is that this Internet criminal has a codesigning certificate issued by Apple, which causes Gatekeeper to give the installer a pass. Apple could revoke the certificate, but as of this writing, has not done so, even though it's aware of the problem. This failure of oversight has compromised both Gatekeeper and the Developer ID program. You can't rely on Gatekeeper alone to protect you from harmful software.
    *If you don't see the contextual menu item, copy the selected text to the Clipboard by pressing the key combination  command-C. In the Finder, select
              Go ▹ Go to Folder...
    from the menu bar and paste into the box that opens by pressing command-V. You won't see what you pasted because a line break is included. Press return.

  • How to deal with the light of picture??

    how to deal with the light of picture?? it must be natural~~

    You may have posted in the wrong forum. If you provide more information about exactly what it is you're trying to accomplish, someone can probably direct you to a relevant forum.

  • How to select all the people that are not in any equipe  ?

    Hi,
    I have a nice SQL expression that gives me as a result all the "AGENTS" (people) that are working in an EQUIPE (a team)
    select a."AGENT_ID",
    a."NOM" || ' ' || a."PRENOM" "Nom",
    c.libelle "Equipe",
    a."DATE_EMBAUCHE" "Date embauche",
    a."DATE_DEBAUCHE" "Date débauche"
    from OBSERVATOIRE."AGENT" a,
    observatoire.equipe_agents b,
    observatoire.equipe c
    where a.agent_id = b.agent_id
    and b.equipe_id = c.equipe_id
    order by nom
    Now, how to select all the agents that are NOT working in any "EQUIPE" (team) ?
    I have tried but could not succeed !
    Thank you for your kind help.
    Christian

    Christian from France wrote:
    It is not working because the table EQUIPE_AGENTS does not contains a row if the agent is not into any equipe.
    CREATE TABLE "OBSERVATOIRE"."EQUIPE_AGENTS"
    (     "EQUIPE_AGENTS_ID" NUMBER NOT NULL ENABLE,
         "EQUIPE_ID" NUMBER NOT NULL ENABLE,
         "AGENT_ID" NUMBER NOT NULL ENABLE)
    CREATE TABLE "OBSERVATOIRE"."AGENT"
    (     "AGENT_ID" NUMBER NOT NULL ENABLE,
         "GRADES_ID" NUMBER NOT NULL ENABLE,
         "NOM" VARCHAR2(50 BYTE) NOT NULL ENABLE,
         "PRENOM" VARCHAR2(50 BYTE),
         "DATE_EMBAUCHE" DATE NOT NULL ENABLE,
         "DATE_DEBAUCHE" DATE)
    The only way to "know" if an agent is not into any equipe (team) is to search into the EQUIPE_AGENTS table, and if we do not find the ID of the agent into this table, then we know that this agent is not into any EQUIPE (team).
    I don't know ho to translate this into SQL.And that's what my query does. It uses an OUTER JOIN so that a result record is returned whether or not there is a record in EQUIPE_AGENTS. And the check for EQUIPE_ID is NULL restricts the result set to those where there IS NOT a record in EQUIPE_AGENTS.
    A more traditional way would be to use NOT IN or NOT EXISTS clauses, but they can prove inefficient.

  • How can I cancel the item that did not ship on my pre-order.

    Hello,
    I ordered two devices on my pre-order, one item shipped and the other didn't.
    How do I cancel the item that did not ship on my pre-order?

        sirguynate805 We're glad that you received your iPhone 6 Plus! Check out this link for cool iPhone info http://vz.to/1e948q1 . Enjoy your new phone and let us know how we can help.
    SheritaH_VZW
    Follow us on Twitter
    @VZWSupport

  • How to deal with the growing table?

    Every tables are growing in any applications. In some applications, tables become larger and larger quickly. How to deal with this problem?
    I am developing an application system now. Should I add a lot of delete commands in the code for each table?

    junez wrote:
    Every tables are growing in any applications. In some applications, tables become larger and larger quickly. How to deal with this problem?
    I am developing an application system now. Should I add a lot of delete commands in the code for each table?Uh, well, yes if you continually add rows to a table the table will grow ... sooner or later you will want to delete rows that are no longer needed. What did you expect? You have to decide what the business rules are to determine when a row can be deleted, and make sure your design allows for such rows to be identified. This is called ..... analysis and design.

  • How to deal with the product price difference g/l account

    Hi:
    When I went to the transaction fs10n to look at the g/l account 281500(gain from own product price differences) and I found there has 40 EUR in credit column,then the cumulative balance is credit 40 EUR,obviously this 40 EUR credit is due to the difference between order price and invoice price. My question is how to deal with it?

    The Finance department needs to coordinate it with the Purchasing on the correct price. If the invoice price is the correct one, then there is a need to recognize the difference as per accounting standard. If in case that the order price is the correct one, they should inform the Vendor about it and once the Debit or Credit note is received, you just need to post it as "subsequent debit or credit" the amount will offset to this price difference.

  • Organizational unit transfers ,how to deal with the person in it ?

    Hi,All,I need your help!
    if an organizational unit has been transfered to another upper organizational unit ,and there are already persons assigned to different positions of it,so how to deal with this problem?are those person's IT 0000,0001should be changed too?and how to maintain this kind of change?is a personnel action necessary?or there is some other more efficient way for it?

    Hi
    In IT0001 You have a Position which is linked to a Org unit. If you want to change the org units reporting relationship then you have to change it in OM by creating a new relationship with the upper org unit.
    All the person are assigned to position so nothing needs to be done in  PA.
    Reward points if useful.
    Regards

  • IMac SSD full - how to deal with the two drives

    Greetings all,
    I've been using an iMac i7 with two drives SSC and HDD.  Recently, I've been having issues with the SSD being close to full.  I use it for applications only, although some apps need lots of space (iTunes, iMovie, Photoshop, etc.)  I use Lightroom and have all the images on the spinning drive.  Does anyone know how to deal with this issue?  Any way I can move the music from iTunes to the separate drive, or any way to figure out what exactly is using most of my space?
    Thanks in advance for your help.
    erlkonig

    Here's some utilities for analyzing disk space:
    DiskInventory
    GrandPerspective
    OmniDiskSweeper
    WhatSize
    You might want to consider putting your home directory on the HDD.
    How to Move the Home Folder in OS X – and Why
    Moving your home folder in OS X

  • How to deal with the barcode?

    i'm developing a file storage system in java, there're two barcode on each file(one is pdf417, the other one is code128) , but now ,there's a problem confused me :
    i use the barcode scanner to scan the file and get images of these files from the scanner , but i have no idea how to deal with these images,
    i need the barcode information on the images, and i know there're some java components can help me to read the barcode from images , for example : BarcodeReader from Barcode Library, but these components were too expensive for me , is there any other way can solve this problem?

    yes, look for a cheaper component...
    Or write your own...
    Or save up until you can afford the more expensive ones...

Maybe you are looking for