How to compare an Object of type class?

Hi,
I got a generic array and want to check which class it contains.
Now i tried to use
Class c = T[0].getClass();and later
if(c instanceof Float){
}but this don't work.
So how to compare two instances of Class?
Maybe by looking for the name of the class and compare them?
regards.
Olek

import java.util.*;
public class WorksForMe {
    public static void main(String[] args) {
        List<Object> list = new ArrayList<Object>();
        list.add(Float.valueOf(17));
        Class<?> cls = list.get(0).getClass();
        System.out.println(Float.class.equals(cls)); //true
        System.out.println(Float.class == cls); //true
}But again, it's best to avoid this kind of case analysis.

Similar Messages

  • How to compare two Objects !!!!

    Hi All,
    I know that this question has been asked 100 times till now. But trust me I have checked all of them but couldn`t find answer. Here is my question:
    I have an objecs. In that object I am setting (Id,Name,DOJ). Now I want to check whether the object I am trying to save in database already exists or not. If exists then I need to check whether all the setters are same for the two objects. Now can anyone tell me ,how to compare two objects directly without comparing the setters individually.
    Thanks in advance.

    pavan13 wrote:
    That is pretty good idea. However I have a query. Does that code actually compare all the setters in a two beans. I don`t want to check each setter seperately.Well, it's pretty meaningless to talk about "comparing setters", setters are methods, they don't have values to compare. Because equals is inside the class, you can simply compare the fields that get set by the setters. "Properties" is probably a better name.
    In principal you could write something that tried to find all relevant fields and compare them, using reflection or bean info stuff. The resulting code would be about 50 times longer and take about 50 times longer to run. It's hardly asking a lot to put three comparisons between && operators.
    Remember, though, not to compare string fields with ==, you should call .equals on the string fields.
    p.s. don't let the bean terminology confuse you. Beans are just ordinary objects which follow a few rules. Personally I wish the term had never been coined.
    Edited by: malcolmmc on Dec 6, 2007 4:15 PM

  • How to create an object of a class?

    plz read the question carefully ..
    how to create the object of a class by giving the class name as an String
    suppose i have a java file name:" java1.java ".
    so now how to create an object of this class "java1"by passing a string "java1"..

    kajbj wrote:
    rajeev-usendi wrote:
    thanks but still i have problem..
    i have created the object but now i m unable to do anything with that created object..
    i have coded like this..
    Object o= Class.forName("java1").new Instance();
    after this i m unable to do anything with the object 'o'..So why did you create the instance? You can also get all methods using reflection, but that is probably not what you want to do. You should instead let the class implement an interface and cast the created object into that interface ans call the methods that you want to call.
    KajI agree with Kaj. If you need to use a class that's unavailable at compile time, you should create an appropriate interface by which to refer to the class and then you create instances reflectively and access them normally via their interface (which is called reflective instantiation with interface access)

  • How to cast an object to a class known only at runtime

    I have a HashMap with key as a class name and value as the instance of that class. When I do a 'get' on it with the class name as the key, what I get back is a generic java.lang.Object. I want to cast this generic object to the class to which it belongs. But I don't know the class at compile time. It would be available only at runtime. And I need to invoke methods on the instance of this specifc class.
    I'm not aware of the ways to do it. Could anybody suggest/guide me how to do it? I would really appreciate.
    Thanks a lot in advance.

    Thanks all for the prompt replies. I am using
    reflection and so a generic object is fine, I guess.
    But a general question (curiosity) specific to your
    comment - extraordinarily generic...
    I understand there's definitely some overhead of
    reflection. So is it advisable to go for interface
    instead of reflection?
    Thanks.Arguments for interfaces rather than reflection...
    Major benefit at run-time:
    Invoking a method using reflection takes more than 20 times as long without using a JIT compiler (using the -Xint option of Java 1.3.0 on WinNT)... Unable to tell with the JIT compiler, since the method used for testing was simple enough to inline - which resulted in an unrealistic 100x speed difference.
    The above tests do not include the overhead of exception handling, nor for locating the method to be executed - ie, in both the simple method invocation and reflective method invocations, the exact method was known at compile time and so there is no "locative" logic in these timings.
    Major benefit at compile-time:
    Compile-time type safety! If you are looking for a method doSomething, and you typo it to doSoemthing, if you are using direct method invocation this will be identified at compile time. If you are using reflection, it will compile successfully and throw a MethodNotFoundException at run time.
    Similarly, direct method invocation offers compile-time checking of arguments, result types and expected exceptions, which all need to be dealt with at runtime if using reflection.
    Personal and professional recommendation:
    If there is any common theme to the objects you're storing in your hashtable, wrap that into an interface that defines a clear way to access expected functionality. This leaves implementations of the interface (The objects you will store in the hashtable) to map the interface methods to the required functionality implementation, in whatever manner they deem appropriate (Hopefully efficiently :-)
    If this is feasible, you will find it will produce a result that performs better and is more maintainable. If the interface is designed well, it should also be just as extensible as if you used reflection.

  • How to create an object of type 99

    Hi guys,
    Am struck creating a HR object with subty = 99.
    I was trying to BDC  PP01 transaction.
    But I dont see the object type 99.
    They call it as FI hierarchy node...
    Am a HR Tech consultant..
    Could not understand what that means...
    Please help me how to create an object in HR with subty 99
    Thanks in advance...

    Class.forName does not create an object. It returns a reference to the Class object that describes the metadata for the class in question--what methods and fields it has, etc.
    To create an object--regardless of whether it's your class or some other class--you could call newInstance on the Class object returned from Class.forName, BUT only if that class has a no-arg constructor that you want to call.
    Class<MyClass> clazz = Class.forName("com.mycompany.MyClass");
    MyClass mine = clazz.newInstance();If you want to use a constructor that takes parameters, you'll have to use java.lang.reflect.Constructor.
    Google for java reflection tutorial for more details.
    BUT reflection is often abused, and often employe when not needed. Why is it that you think you need this?

  • How to compare the object's properties

    Hi ,
    I have a requirement like to compare two objects data. But the object will have different types of parameters and it will have some other classes as properties. My utility has to compare for all the properties of the object including other classes properties which are included as properties in the main object also.
    Can we achieve using java reflection this requirement.
    If any one has idea reg this , plz help me.
    thanks
    Prakash

    hari_honey wrote:
    No , actually i have to generate the change log of object data.
    If any property of the object is changed and that has to go to the change log table with the
    property name and old and new value.Sounds expensive and complex.
    Presumably you can't change the code.
    Presumably you can't provide a proxy layer.
    Have you consider code injection?

  • How do i create objects of ordinary Classes from a javabean

    I want to create a class Person below that I want to create an object from in my javabeans.
    Look below Person class definition for continuation.
    package data;
    public class Person
    private String name;
    public Person()
    name = "No name yet.";
    public Person(String initialName)
    name = initialName;
    public void setName(String newName)
    name = newName;
    public String getName()
    return name;
    public void writeOutput()
    System.out.println("Name: " + name);
    public boolean sameName(Person otherPerson)
    return (this.name.equalsIgnoreCase(otherPerson.name));
    I run this bean class in the WEB-INF/classes/data folder creating a Person object in the deal() method below
    When I compile the class it seems to fail. It does not recognise the Person class. Can you help me with a description of what to do to call
    ordinary class objects from javabean class definitions.
    What directories should the simple classes be put and what should I include in the javabean to be able to access them?
    package data;
    import java.sql.*;
    import data.*;
    public class Bean
    { private Connection databaseConnection ;
    // private Person p;
    public Bean()
    super();
    public boolean connect() throws ClassNotFoundException, SQLException
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    String sourceURL = "jdbc:odbc:robjsp";
    databaseConnection = DriverManager.getConnection(sourceURL);
    return true;
    public ResultSet execquery(String restrict) throws SQLException
    Statement statement = databaseConnection.createStatement();
    String full = "SELECT customerid,CITY,Address from customers " + restrict;
    ResultSet authorNames = statement.executeQuery(full);
    return (authorNames ==null ) ? null : authorNames;
    public String deal() throws SQLException
    {  Person p = new Person();
    p.setName("Roberto");
    return p.getName();
    }

    There is no "Copy File" function in Lightroom.
    Lightroom was designed to eliminate the need to make duplicate copies of files. The organizational tools in Lightroom allow you to have one file categorized in many ways, you can assign multiple keywords to the photos (for example: Winery, Finger Lakes, Fall Foliage, Jessica). Similarly, you can have a file categorized in multiple Lightroom collections at the same time, all without making a copy of the photo. The benefit of this is that you don't need to make multiple copies of each photo, one copy suffices, and thus disk space is saved; and furthermore if you should edit a photo or add metadata, you only need to do this once, and the photo's appearance, or the photo's metadata is changed, and visible to you no matter how you choose to access the photo (pick any keyword or any collection and you will see the change)

  • How to create an object of inner class

    hi i don't know how to create an object of an inner class..
    i got something like
    class Abc{
    private class Abcd {
    like this and i want to create an object of Abcd so that i can use some of method
    there..
    i think i should create the outter class object first right? but not sure
    the syntax.. i tried something like
    Abc.Abcd justTry = new Abc.Abcd()
    something like this..but not work..
    help me plz. ...

    If the nested class (that's not technically an inner
    class you have there) is not static, then you can't
    refer to it with OuterClassName.InnerClassName any
    more than you can refer to any other member--method
    or variable--with ClassName.staticMember.
    You need an instance.
    It's been a while since I've created an instance of a
    non-static nested class from outside that clsas, but
    I think it's something like this: Outer outer = new Outer();
    outer.Inner inner = new outer.Inner();
    Actually, I think it is this:
      Outer outer = new Outer();
      outer.Inner inner = outer.new Inner();Can't test it now though, gotta go to Taco John's for TACO TUESDAY!!!!
    Gotta love them crunchy shell bean tacos!!!

  • How to make an object of inner class and use it ?

    Hi tecs,
    In my JSF application i have a need to make an inner member class in one of my bean class.
    How can i make the object of this class?(what should be the entry in faces-config)
    And there are text box and check box (in the JSP) associated with the elements of this inner class. What should be the coding in JSP so that elements in the JSP can be linked with the corresponding members of the inner class ?
    Plz help.
    Thnx in advance.

    Hi
    I am havin 10 text boxes in my application.
    But out of 10 , 3 will be always together(existence of one is not possible without the other two.)
    Now i want to create a vector of objects ( here object will consist of the value corresponding to these three boxes),there can be many elements in this vector.
    So i m thinking to make an inner class which have three String variables corresponding to these text boxes that exists together.
    What can b done ?

  • How to compare 2 Objects( and )?

    Should I write an interface?

    Java has 2 interfaces that would be of interest to you.
    They both are designed to return an integer that describes the relationship between two objects.
    Suppose you have two objects: objectA and objectB
    The return value is as following:
    if (returnValue < 0) then objectA precedes objectB. (A < B)
    if (returnValue > 0) then objectA follows objectB. (A > B)
    if (returnValue == 0) then objectA and objectB are equivalent (A == B).
    It is up to you to do the comparing and determine which is the correct return value...
    Here are the two interfaces:
    1) Comparable interface (java.lang.Comparable)
    You would use this interface when you have a class that exhibits some natural order..
    You add this interface to the class, and, within the class, implement the following method:
       public int compareTo( Object obj )
       The variable obj in this case refers to the "other" object that you want to compare.
       public class MyClass implements Comparable // <--- notice the last two words!!
              other methods.
          public boolean isTallerThan( MyClass mc )
             // just some method i made up to compare...
          public int compareTo( Object objectB )
             // You are comparing "this" object with the "otherObject"...
             // Note that objectA is "this".
             MyClass otherObject = (MyClass)objectB;
             // Do whatever you need to compare the two.
             if (this.isTallerThan(otherObject) )
                 return -1;
             else if ( otherObject.isTallerThan(this) )
                 return +1;
             else
                 return 0; // they are of equal height...whatever...
       2) Comparator interface (java.util.Comparator)
    You could use this interface if you have a different set of standards with which to compare two different objects. Usually, it is it's own class, designed for only this purpose. You implement the following method:
       public int compare( Object objA, Object objB )
       Notice that in this case you have to explicitly pass in both objects to be compared, whereas in the Comparable interface, objA is implicitly assumed to be the object on which the method is called (or as I like to call it, this).
    Here is an example:
       public class MyComparator implements Comparator
          public int compare( Object objA, Object objB )
             do whatever comparisons you need to determine whether
             objA < objB (-1 is returned)
             objA > objB (+1 is returned)
             or
             objA == ObjB (0 is returned)

  • How to pass the object of one class to the another class?

    Hello All,
    My problem is i am sending the object of serializable class from one class to another class but when i collection this class into another it is transfering null to that side even i filled that object into the class before transfer and the point is class is serializable
    code is below like
    one class contain the code where i collecting the object by calling this function of another class:-
    class
    lastindex and initIndex is starting and ending range
    SentenceStatusImpl tempSS[] = new SentenceStatusImpl[lastIndex-initIndex ];
    tempSS[i++] = engineLocal.CallParser(SS[initIndex],g_strUserName,g_strlanguage,g_strDomain);
    another class containg code where we transfering the object:-
    class
    public SentenceStatusImpl CallParser(SentenceStatusImpl senStatus, String strUserName, String strLanguage, String strDomain)
    *//here some code in try block*
    finally
    System.+out+.println("inside finally...........block......"+strfinaloutput.length);
    senStatus.setOutputSen(strfinaloutput);//strfinaloutput is stringbuffer array containg sentence
    fillSynonymMap(senStatus);
    senStatus.setTranslateStatus(*true*);
    return senStatus;
    Class of which object is serialized name sentenceStatusimpl class:-
    public class SentenceStatusImpl implements Serializable
    ///Added by pavan on 10/06/2008
    int strSourceSenNo;
    String strSourceSen = new String();
    String strTargetSen = new String();
    StringBuffer[] stroutputSen = null;
    HashMap senHashMap = new HashMap();
    HashMap dfaMarkedMap = new HashMap();
    boolean bTargetStatus = false;
    public SentenceStatusImpl(){
    public void setOutputSen(StringBuffer[] outputSen){
    stroutputSen = outputSen;
    public StringBuffer[] getOutputSen(){
    return stroutputSen;
    public void setTranslateStatus(*boolean* TargetStatus){
    bTargetStatus = TargetStatus;
    }//class

    ok,
    in class one
    we are calling one function (name callParser(object of sentenceStatusImpl class,.....argument.) it return object of sentenceStatusImple class containg some extra information ) and we collecting that object into same type of object.
    and that sentenceStatusImple classs implements by Serializable
    so it some cases it is returning null
    if you think it is not proper serialization is please replay me and suggest proper serialization so that my work is to be done properly (without NULL)
    hope you understand my problem

  • How to compare the names and types columns of two tables?

    Assume I have two tables aaa and bbb
    How do I compare the columnnames and types of the two columns?
    It should not matter if one of them has e.g. an additional index.
    Furthermore it does not matter if the rows/row values differ.
    Peter

    SQL> desc emp
    Nome                   Nullo?   Tipo
    EMPNO                  NOT NULL NUMBER(4)
    ENAME                           VARCHAR2(10)
    JOB                             VARCHAR2(9)
    MGR                             NUMBER(4)
    HIREDATE                        DATE
    SAL                             NUMBER(7,2)
    COMM                            NUMBER(7,2)
    DEPTNO                          NUMBER(2)
    SQL> desc emp2
    Nome                   Nullo?   Tipo
    EMPNO                  NOT NULL NUMBER(4)
    ENAME                           VARCHAR2(10)
    MGR                             VARCHAR2(10)
    HIREDATE                        DATE
    SAL                             NUMBER(7,2)
    COMM                            NUMBER(7,2)
    DEPTNO                          NUMBER(2)
    NEWCOL                          NUMBER
    SQL> with t1 as
      2  (select column_name, data_type from user_tab_columns where table_name='EMP'),
      3  t2 as
      4  (select column_name, data_type from user_tab_columns where table_name='EMP2')
      5  Select a.column_name, a.data_type, b.column_name, b.data_type
      6  from t1 a full outer join t2 b on a.column_name=b.column_name;
    COLUMN_NAME                    DATA_TYPE                      COLUMN_NAME                    DATA_TYPE
    EMPNO                          NUMBER                         EMPNO                          NUMBER
    ENAME                          VARCHAR2                       ENAME                          VARCHAR2
                                                                  NEWCOL                         NUMBER
    MGR                            NUMBER                         MGR                            VARCHAR2
    HIREDATE                       DATE                           HIREDATE                       DATE
    SAL                            NUMBER                         SAL                            NUMBER
    COMM                           NUMBER                         COMM                           NUMBER
    DEPTNO                         NUMBER                         DEPTNO                         NUMBER
    JOB                            VARCHAR2
    Selezionate 9 righe.Max
    http://oracleitalia.wordpress.com
    Edited by: Massimo Ruocchio on Feb 21, 2010 1:27 AM
    Changed query.

  • How to compare 2 objects?

    Hi! I guess some one can help me. The question may be silly but i need help, please.
    Q: User has filled the form and submitted the values to server, they are not stored in database, but stored in an Object container. Then, before he logs out of application again the user wants to modify the values and click on that page link. The user will get all the values back into the fields. Now he may change the values or may not and submits the values to server again to store in an object container.
    Now, before i store the updated values into the original object, How to check the object is modified or not?
    Can i use the comparator interface for this? if so, how?
    Note: I do not want to update the object if it has not modified, I use MQ in my application to make call to legacy system, so i store in an object.

    Override the equals( Object ) method on your objects and then just compare the new objects to the old ones using the equals method.
    if (!object1.equals( object2 ) )
    // they are different
    In the equals method you can do the comparison check.
    Bryan

  • How do i use objects from one class in anohter?

    Hey
    I have two GUI classes ShowWhiteGUI and BasketGUI and then a control class ShowWhite. The control class calls all the method from anohter class's which the GUI classes are gonna use.
    The basis idea with this script is it shall be a very very simpel Shop. Where you can add items to a basket and then show the items in a new window(BasketGUI).
    So here is the problem. I cant create an object in both GUI classes, because then im working with two sets of data, right? So how do i do this?
    Here is my code:
    ShowWhiteGUI
    * ShowWhiteGUI.java
    * Created on 5. februar 2008, 10:43
    package userclasses;
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    * @author  Lille mus
    public class ShowWhiteGUI extends javax.swing.JFrame {
        private BasketGUI basketGUI;
        private ShowWhite control;
        /** Creates new form ShowWhiteGUI */
        public ShowWhiteGUI() {
            basketGUI = new BasketGUI();
            control = new ShowWhite();
            initComponents();
        /** This method is called from within the constructor to
         * initialize the form.
         * WARNING: Do NOT modify this code. The content of this method is
         * always regenerated by the Form Editor.
        // <editor-fold defaultstate="collapsed" desc="Generated Code">                         
        private void initComponents() {
            aboutDialog = new javax.swing.JDialog();
            jLabel1 = new javax.swing.JLabel();
            jScrollPane1 = new javax.swing.JScrollPane();
            jTextArea1 = new javax.swing.JTextArea();
            itemIdField = new javax.swing.JTextField();
            productIdLabel = new javax.swing.JLabel();
            numberOfItems = new javax.swing.JLabel();
            productId = new javax.swing.JTextField();
            basketButton = new javax.swing.JButton();
            jLabel2 = new javax.swing.JLabel();
            showBasketButton = new javax.swing.JButton();
            jMenuBar1 = new javax.swing.JMenuBar();
            menu = new javax.swing.JMenu();
            jMenu1 = new javax.swing.JMenu();
            open = new javax.swing.JMenuItem();
            quit = new javax.swing.JMenuItem();
            jMenuItem1 = new javax.swing.JMenuItem();
            jMenu2 = new javax.swing.JMenu();
            help = new javax.swing.JMenuItem();
            about = new javax.swing.JMenuItem();
            javax.swing.GroupLayout aboutDialogLayout = new javax.swing.GroupLayout(aboutDialog.getContentPane());
            aboutDialog.getContentPane().setLayout(aboutDialogLayout);
            aboutDialogLayout.setHorizontalGroup(
                aboutDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGap(0, 400, Short.MAX_VALUE)
            aboutDialogLayout.setVerticalGroup(
                aboutDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGap(0, 300, Short.MAX_VALUE)
            setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
            setTitle("Show White's Shop");
            setBackground(new java.awt.Color(0, 102, 255));
            jLabel1.setFont(new java.awt.Font("Baby Kruffy", 0, 36));
            jLabel1.setText("Snow White?s Shop");
            jTextArea1.setColumns(20);
            jTextArea1.setEditable(false);
            jTextArea1.setRows(5);
            jTextArea1.setText(control.getPrintAllStockItems());
            jScrollPane1.setViewportView(jTextArea1);
            productIdLabel.setText("Varenummer:");
            numberOfItems.setText("Antal:");
            basketButton.setText("L?g i kurv");
            basketButton.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    putInBasket(evt);
            showBasketButton.setText("Vis indk?bskurv");
            showBasketButton.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    showBasket(evt);
            menu.setLabel("Fil");
            jMenu1.setText("Menu");
            menu.add(jMenu1);
            open.setLabel("?bn");
            open.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    open(evt);
            menu.add(open);
            quit.setLabel("Luk");
            quit.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    quit(evt);
            menu.add(quit);
            jMenuItem1.setLabel("Gem");
            jMenuItem1.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    save(evt);
            menu.add(jMenuItem1);
            jMenuBar1.add(menu);
            jMenu2.setLabel("Hj?lp");
            help.setLabel("Hj?lp");
            help.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    help(evt);
            jMenu2.add(help);
            about.setLabel("Om Show White Shop");
            jMenu2.add(about);
            jMenuBar1.add(jMenu2);
            setJMenuBar(jMenuBar1);
            javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
            getContentPane().setLayout(layout);
            layout.setHorizontalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(layout.createSequentialGroup()
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(layout.createSequentialGroup()
                            .addGap(37, 37, 37)
                            .addComponent(jLabel1))
                        .addGroup(layout.createSequentialGroup()
                            .addContainerGap()
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
                                    .addComponent(productIdLabel)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(itemIdField, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(numberOfItems))
                                .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 184, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(layout.createSequentialGroup()
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(productId, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 65, Short.MAX_VALUE)
                                        .addComponent(basketButton))
                                    .addGroup(layout.createSequentialGroup()
                                        .addGap(31, 31, 31)
                                        .addComponent(jLabel2)))
                                .addGroup(layout.createSequentialGroup()
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(showBasketButton)))))
                    .addContainerGap())
            layout.setVerticalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(layout.createSequentialGroup()
                    .addComponent(jLabel1)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                        .addGroup(layout.createSequentialGroup()
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 179, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jLabel2))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 49, Short.MAX_VALUE)
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(productIdLabel)
                                .addComponent(itemIdField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(numberOfItems)
                                .addComponent(productId, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addGroup(layout.createSequentialGroup()
                            .addComponent(showBasketButton)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 202, Short.MAX_VALUE)
                            .addComponent(basketButton)))
                    .addContainerGap())
            pack();
        }// </editor-fold>                       
        public void createBasketWindow(){
            basketGUI.setVisible(true);
        private void showBasket(java.awt.event.ActionEvent evt) {                           
            createBasketWindow();
        private void putInBasket(java.awt.event.ActionEvent evt) {                            
            Integer itemId = Integer.parseInt(itemIdField.getText());
            String petToAdd = control.getFindItem(itemId);
            System.out.println(petToAdd);
            control.setAddItemToBasket(itemId);
            basketGUI.addPetToBasket(petToAdd);     
        private void help(java.awt.event.ActionEvent evt) {                     
        private void save(java.awt.event.ActionEvent evt) {                     
            System.out.println("Gemmer fil");
        private void open(java.awt.event.ActionEvent evt) {                     
            System.out.println("?bn fil");
        private void quit(java.awt.event.ActionEvent evt) {                     
            System.exit(0);
        public ShowWhite getControl(){
            return control;
         * @param args the command line arguments
        public static void main(String args[]) {
            java.awt.EventQueue.invokeLater(new Runnable() {
                public void run() {
                    new ShowWhiteGUI().setVisible(true);
        // Variables declaration - do not modify                    
        private javax.swing.JMenuItem about;
        private javax.swing.JDialog aboutDialog;
        private javax.swing.JButton basketButton;
        private javax.swing.JMenuItem help;
        private javax.swing.JTextField itemIdField;
        private javax.swing.JLabel jLabel1;
        private javax.swing.JLabel jLabel2;
        private javax.swing.JMenu jMenu1;
        private javax.swing.JMenu jMenu2;
        private javax.swing.JMenuBar jMenuBar1;
        private javax.swing.JMenuItem jMenuItem1;
        private javax.swing.JScrollPane jScrollPane1;
        private javax.swing.JTextArea jTextArea1;
        private javax.swing.JMenu menu;
        private javax.swing.JLabel numberOfItems;
        private javax.swing.JMenuItem open;
        private javax.swing.JTextField productId;
        private javax.swing.JLabel productIdLabel;
        private javax.swing.JMenuItem quit;
        private javax.swing.JButton showBasketButton;
        // End of variables declaration                  
    }BasketGUI:
    * Basket.java
    * Created on 5. februar 2008, 15:29
    package userclasses;
    import javax.swing.JTextArea;
    * @author  Lille mus
    public class BasketGUI extends javax.swing.JFrame {
        private String newline = "\n";
        private InvoiceGUI invoiceGUI;
        /** Creates new form Basket */
        public BasketGUI() {       
            initComponents();
            //invoiceGUI = new InvoiceGUI();
        public void addPetToBasket(String pet){
            jTextArea1.append(pet+newline);
        /** This method is called from within the constructor to
         * initialize the form.
         * WARNING: Do NOT modify this code. The content of this method is
         * always regenerated by the Form Editor.
        // <editor-fold defaultstate="collapsed" desc="Generated Code">                         
        private void initComponents() {
            jLabel1 = new javax.swing.JLabel();
            jScrollPane1 = new javax.swing.JScrollPane();
            jTextArea1 = new javax.swing.JTextArea();
            jButton1 = new javax.swing.JButton();
            itemIdField = new javax.swing.JTextField();
            jLabel2 = new javax.swing.JLabel();
            removeItemButton = new javax.swing.JButton();
            setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
            setTitle("Indk?bskurv");
            jLabel1.setText("Indk?bskurv");
            jTextArea1.setColumns(20);
            jTextArea1.setRows(5);
            jScrollPane1.setViewportView(jTextArea1);
            jButton1.setText("K?b og print kvittering");
            jButton1.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    printInvoice(evt);
            jLabel2.setText("Slet varenr");
            removeItemButton.setText("Slet");
            removeItemButton.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    removeItemFromBasket(evt);
            javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
            getContentPane().setLayout(layout);
            layout.setHorizontalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(layout.createSequentialGroup()
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(layout.createSequentialGroup()
                            .addGap(21, 21, 21)
                            .addComponent(jLabel1))
                        .addGroup(layout.createSequentialGroup()
                            .addContainerGap()
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addGroup(layout.createSequentialGroup()
                                    .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 141, Short.MAX_VALUE)
                                    .addComponent(jButton1))
                                .addGroup(layout.createSequentialGroup()
                                    .addComponent(jLabel2)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(itemIdField, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(removeItemButton)))))
                    .addContainerGap())
            layout.setVerticalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(layout.createSequentialGroup()
                    .addContainerGap()
                    .addComponent(jLabel1)
                    .addGap(20, 20, 20)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addComponent(jButton1)
                        .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 125, Short.MAX_VALUE)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jLabel2)
                        .addComponent(itemIdField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(removeItemButton))
                    .addContainerGap())
            pack();
        }// </editor-fold>                       
        private void removeItemFromBasket(java.awt.event.ActionEvent evt) {                                     
            Integer itemId = Integer.parseInt(itemIdField.getText());
        private void printInvoice(java.awt.event.ActionEvent evt) {                             
            //invoiceGUI.setVisible(true);
        public JTextArea getTextArea(){
            return jTextArea1;
         * @param args the command line arguments
        public static void main(String args[]) {
            java.awt.EventQueue.invokeLater(new Runnable() {
                public void run() {
                    new BasketGUI().setVisible(true);
        // Variables declaration - do not modify                    
        private javax.swing.JTextField itemIdField;
        private javax.swing.JButton jButton1;
        private javax.swing.JLabel jLabel1;
        private javax.swing.JLabel jLabel2;
        private javax.swing.JScrollPane jScrollPane1;
        private javax.swing.JTextArea jTextArea1;
        private javax.swing.JButton removeItemButton;
        // End of variables declaration                  
    }ShowWhite:
    * ShowWhite.java
    * Created on 13. februar 2008, 18:15
    * To change this template, choose Tools | Template Manager
    * and open the template in the editor.
    package userclasses;
    * @author Lille mus
    public class ShowWhite {
        public Basket basket;
        public Stock stock;
        /** Creates a new instance of ShowWhite */
        public ShowWhite() {
            stock = new Stock();
            basket = new Basket();
        public String getFindItem(int itemId){
            String returnItem = stock.findItem(itemId);
            return returnItem;
        public void setAddItemToBasket(int itemId){
            basket.addItemToBasket(itemId);
        public String getPrintAllStockItems(){
            return stock.printAllStockItems();
        public String getShowBasket(){
             return basket.showBasket();
        public void setRemoveItemFromBasket(int itemId){
            basket.removeItemFromBasket(itemId);
    }

    okay i tried this, but it give me a nullpointerexeption:
    Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
    at userclasses.ShowWhiteGUI.initComponents(ShowWhiteGUI.java:75)
    at userclasses.ShowWhiteGUI.<init>(ShowWhiteGUI.java:21)
    at userclasses.ShowWhite.<init>(ShowWhite.java:26)
    at userclasses.Main.<init>(Main.java:16)
    at userclasses.Main$1.run(Main.java:31)
    ShowWhite
    public class ShowWhite {
        public Basket basket;
        public Stock stock;
        private ShowWhiteGUI mainGUI;
        private BasketGUI basketGUI;
        /** Creates a new instance of ShowWhite */
        public ShowWhite() {
            stock = new Stock();
            basket = new Basket();
            mainGUI = new ShowWhiteGUI(this);
            basketGUI = new BasketGUI();
        public String getFindItem(int itemId){
            String returnItem = stock.findItem(itemId);
            return returnItem;
        public void setAddItemToBasket(int itemId){
            basket.addItemToBasket(itemId);
        public String getPrintAllStockItems(){
            return stock.printAllStockItems();
        public String getShowBasket(){
             return basket.showBasket();
        public void setRemoveItemFromBasket(int itemId){
            basket.removeItemFromBasket(itemId);
        public void createMainGUI(){
            mainGUI.setVisible(true);
        public BasketGUI getBasketGUI(){
            return basketGUI;
        public void setAddPetToBasket(String pet){
            basketGUI.addPetToBasket(pet);
    }ShowWhiteGUI:
    public class ShowWhiteGUI extends javax.swing.JFrame {
        private ShowWhite control;
        /** Creates new form ShowWhiteGUI */
        public ShowWhiteGUI(ShowWhite control) {
            initComponents();
            this.control = control;
        /** This method is called from within the constructor to
         * initialize the form.
         * WARNING: Do NOT modify this code. The content of this method is
         * always regenerated by the Form Editor.
        // <editor-fold defaultstate="collapsed" desc="Generated Code">                         
        private void initComponents() {
            aboutDialog = new javax.swing.JDialog();
            jLabel1 = new javax.swing.JLabel();
            jScrollPane1 = new javax.swing.JScrollPane();
            jTextArea1 = new javax.swing.JTextArea();
            itemIdField = new javax.swing.JTextField();
            productIdLabel = new javax.swing.JLabel();
            numberOfItems = new javax.swing.JLabel();
            productId = new javax.swing.JTextField();
            basketButton = new javax.swing.JButton();
            jLabel2 = new javax.swing.JLabel();
            showBasketButton = new javax.swing.JButton();
            jMenuBar1 = new javax.swing.JMenuBar();
            menu = new javax.swing.JMenu();
            jMenu1 = new javax.swing.JMenu();
            open = new javax.swing.JMenuItem();
            quit = new javax.swing.JMenuItem();
            jMenuItem1 = new javax.swing.JMenuItem();
            jMenu2 = new javax.swing.JMenu();
            help = new javax.swing.JMenuItem();
            about = new javax.swing.JMenuItem();
            javax.swing.GroupLayout aboutDialogLayout = new javax.swing.GroupLayout(aboutDialog.getContentPane());
            aboutDialog.getContentPane().setLayout(aboutDialogLayout);
            aboutDialogLayout.setHorizontalGroup(
                aboutDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGap(0, 400, Short.MAX_VALUE)
            aboutDialogLayout.setVerticalGroup(
                aboutDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGap(0, 300, Short.MAX_VALUE)
            setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
            setTitle("Show White's Shop");
            setBackground(new java.awt.Color(0, 102, 255));
            jLabel1.setFont(new java.awt.Font("Baby Kruffy", 0, 36));
            jLabel1.setText("Snow White?s Shop");
            jTextArea1.setColumns(20);
            jTextArea1.setEditable(false);
            jTextArea1.setRows(5);
            jTextArea1.setText(control.getPrintAllStockItems());
            jScrollPane1.setViewportView(jTextArea1);
            productIdLabel.setText("Varenummer:");
            numberOfItems.setText("Antal:");
            basketButton.setText("L?g i kurv");
            basketButton.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    putInBasket(evt);
            showBasketButton.setText("Vis indk?bskurv");
            showBasketButton.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    showBasket(evt);
            menu.setLabel("Fil");
            jMenu1.setText("Menu");
            menu.add(jMenu1);
            open.setLabel("?bn");
            open.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    open(evt);
            menu.add(open);
            quit.setLabel("Luk");
            quit.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    quit(evt);
            menu.add(quit);
            jMenuItem1.setLabel("Gem");
            jMenuItem1.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    save(evt);
            menu.add(jMenuItem1);
            jMenuBar1.add(menu);
            jMenu2.setLabel("Hj?lp");
            help.setLabel("Hj?lp");
            help.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    help(evt);
            jMenu2.add(help);
            about.setLabel("Om Show White Shop");
            jMenu2.add(about);
            jMenuBar1.add(jMenu2);
            setJMenuBar(jMenuBar1);
            javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
            getContentPane().setLayout(layout);
            layout.setHorizontalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(layout.createSequentialGroup()
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(layout.createSequentialGroup()
                            .addGap(37, 37, 37)
                            .addComponent(jLabel1))
                        .addGroup(layout.createSequentialGroup()
                            .addContainerGap()
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
                                    .addComponent(productIdLabel)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(itemIdField, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(numberOfItems))
                                .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 184, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(layout.createSequentialGroup()
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(productId, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 65, Short.MAX_VALUE)
                                        .addComponent(basketButton))
                                    .addGroup(layout.createSequentialGroup()
                                        .addGap(31, 31, 31)
                                        .addComponent(jLabel2)))
                                .addGroup(layout.createSequentialGroup()
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(showBasketButton)))))
                    .addContainerGap())
            layout.setVerticalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(layout.createSequentialGroup()
                    .addComponent(jLabel1)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                        .addGroup(layout.createSequentialGroup()
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 179, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jLabel2))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 49, Short.MAX_VALUE)
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(productIdLabel)
                                .addComponent(itemIdField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(numberOfItems)
                                .addComponent(productId, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addGroup(layout.createSequentialGroup()
                            .addComponent(showBasketButton)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 202, Short.MAX_VALUE)
                            .addComponent(basketButton)))
                    .addContainerGap())
            pack();
        }// </editor-fold>                       
        public void createBasketWindow(){
            control.getBasketGUI().setVisible(true);
        private void showBasket(java.awt.event.ActionEvent evt) {                           
            createBasketWindow();
        private void putInBasket(java.awt.event.ActionEvent evt) {                            
            Integer itemId = Integer.parseInt(itemIdField.getText());
            String petToAdd = control.getFindItem(itemId);
            System.out.println(petToAdd);
            control.setAddItemToBasket(itemId);
            control.setAddPetToBasket(petToAdd);     
        private void help(java.awt.event.ActionEvent evt) {                     
        private void save(java.awt.event.ActionEvent evt) {                     
            System.out.println("Gemmer fil");
        private void open(java.awt.event.ActionEvent evt) {                     
            System.out.println("?bn fil");
        private void quit(java.awt.event.ActionEvent evt) {                     
            System.exit(0);
        public ShowWhite getControl(){
            return control;
        // Variables declaration - do not modify                    
        private javax.swing.JMenuItem about;
        private javax.swing.JDialog aboutDialog;
        private javax.swing.JButton basketButton;
        private javax.swing.JMenuItem help;
        private javax.swing.JTextField itemIdField;
        private javax.swing.JLabel jLabel1;
        private javax.swing.JLabel jLabel2;
        private javax.swing.JMenu jMenu1;
        private javax.swing.JMenu jMenu2;
        private javax.swing.JMenuBar jMenuBar1;
        private javax.swing.JMenuItem jMenuItem1;
        private javax.swing.JScrollPane jScrollPane1;
        private javax.swing.JTextArea jTextArea1;
        private javax.swing.JMenu menu;
        private javax.swing.JLabel numberOfItems;
        private javax.swing.JMenuItem open;
        private javax.swing.JTextField productId;
        private javax.swing.JLabel productIdLabel;
        private javax.swing.JMenuItem quit;
        private javax.swing.JButton showBasketButton;
        // End of variables declaration                  
    }

  • How to create multiple objects within a class

    I have a item.lvclass which has an item.ctl (contains a cluster of class private data).  I need to add another object (item2.ctl) within that same class so that I can reuse the code for that class.
    So how do you create additional objects within the same class?

    Well... right now...  I've cornered myself going down this path:  http://forums.ni.com/t5/LabVIEW-Idea-Exchange/LVOO​P-Interfaces/idc-p/1314637#M8918
    Seems like the solution in the idea was not implemented yet....
    Okay.  I will try to describe the situation differently...
    Let's say I have a Car.lvclass
    I want to have two objects:  sedan & roadster
    both have similar properties, but also have different properties:
    4 doors vs 2 doors
    hardtop vs convertible
    silver vs white (color)
    I want the two objects to be of the same class so that they can share the same private and public VI's.  As a matter of fact, I want to have both objects in the VI's within the Car.lvclass.

Maybe you are looking for

  • Camera not working after OS X upgrade

    Hello, My canera stopped working on skype after I upgraded mu OS X Lion to Yosemite 10.10.2 Is it normal? Thx ziad

  • How do I convert iMovie HD to show in good quality on the new iPad pleas?

    iMovie HD bundled with the 06 iMac is great for converting to DVD and the iPhone, but how do I get a good quality output to the new iPad? The videos ar grainy to say the least when viewed on the latter.

  • Streaming on embedded linux device

    We are developing a product where our users will use their Spotify account to stream music to a device. The device will be running on a small linux distribution and will need to be able to make calls to Spotify and stream music directly on the device

  • Is PC2 6400 backwards compatible with PC2 5300 RAM?

    Hello everybody, I have a 2.2Ghz white MacBook, late 2007 model. It uses PC2 5300 RAM, and currently has 4 gigs. I have been thinking of maxing it out to 6GB, and was wondering if newer (and cheaper) PC2 6400 memory would work in it. TIA

  • E7-00 screen lock during call

    Hey I have an annoying problem with my phone: the screen lock doesn't seem to work properly during calls. The lock goes off during calls, and very often the call is accidentally put on hold, ended, or put on speaker because of unwanted touch events.