Java NetBeans IDE 6.1 Desing out of control, help needed!!! Please...

Hi,
I have a problem positionning the components in the desing view in NetBeans IDE.
I see some tutorial, its look realy easy but still, I don't get the result I want.
Did it exist a way to fix(lock) my component using the desing view?
When I try to rezise or move my component, the others start moving to and rezise making a complet non-sense and it's the free-for-all help!
Anyone know a link talking of desing in the netbeans more that the basic?(English or french or anyway any other language it's will stay more easy to understand than the move of the components in my interface)
How to select deselect blue anchor when I rezising to select what components will affect another one?
I know it's suppose to be more easy but maybe I do sometinhg wrong when I use the desing view I consider using another ide now ...
Thanks for your help and comment!
Edited by: equattro on Oct 5, 2008 10:02 AM
Edited by: equattro on Oct 5, 2008 10:03 AM
Edited by: equattro on Oct 5, 2008 10:28 AM

This is a forum for matters concerning the Java programming language, not for the NetBeans IDE. Try to find a NetBeans forum for your NetBeans problems.
I believe there's one on nabble.com and another on java-forums.org.
db

Similar Messages

  • I'm trying to sync my iPhone 5 and keep getting error message "Device is timed out", can anyone help me please?

    I'm trying to sync my iphone 5s with itunes and keep getting error message "Device is timed out", can anyone help me please?

    Try here first:
    iTunes: Error 13019 during sync
    Then here:
    Help Unknown Error 13019 (Updated)

  • My ipad touch screen not,also reseted it. It stops suddenly and goes out of control. Need answer very quickly

    My ipad touch screen not,also reseted it. It stops suddenly and goes out of control. Need answer very quickly???????

    Try doing a reboot by holding both the power and home buttons until the apple logo appears and it restarts, ignoring the red slider if that appears.
    If that does not help, take the iPad to an Apple store genius bar and have the techs check out the screen to see if there is a hardware fault.

  • Webservices usin java-netbeans ide

    Hi frnds
    Currently i am creating a webservice using java. I am using netbeans4.1 IDE. When i checked the example given in the quick start guide of Netbeans i am getting an error like cannnot find the Wscompil.class. Here iam pasting the build output
    init:
    deps-module-jar:
    deps-ear-jar:
    deps-jar:
    Created dir: C:\Documents and Settings\sandeep.e\ws\HiWS\build\web\WEB-INF\classes
    Created dir: C:\Documents and Settings\sandeep.e\ws\HiWS\build\web\META-INF
    Copying 1 file to C:\Documents and Settings\sandeep.e\ws\HiWS\build\web\META-INF
    library-inclusion-in-archive:
    Copying 1 file to C:\Documents and Settings\sandeep.e\ws\HiWS\build\web\WEB-INF\lib
    Copying 1 file to C:\Documents and Settings\sandeep.e\ws\HiWS\build\web\WEB-INF\lib
    Copying 1 file to C:\Documents and Settings\sandeep.e\ws\HiWS\build\web\WEB-INF\lib
    Copying 1 file to C:\Documents and Settings\sandeep.e\ws\HiWS\build\web\WEB-INF\lib
    Copying 1 file to C:\Documents and Settings\sandeep.e\ws\HiWS\build\web\WEB-INF\lib
    Copying 1 file to C:\Documents and Settings\sandeep.e\ws\HiWS\build\web\WEB-INF\lib
    Copying 1 file to C:\Documents and Settings\sandeep.e\ws\HiWS\build\web\WEB-INF\lib
    Copying 1 file to C:\Documents and Settings\sandeep.e\ws\HiWS\build\web\WEB-INF\lib
    Copying 1 file to C:\Documents and Settings\sandeep.e\ws\HiWS\build\web\WEB-INF\lib
    Copying 1 file to C:\Documents and Settings\sandeep.e\ws\HiWS\build\web\WEB-INF\lib
    Copying 1 file to C:\Documents and Settings\sandeep.e\ws\HiWS\build\web\WEB-INF\lib
    Copying 1 file to C:\Documents and Settings\sandeep.e\ws\HiWS\build\web\WEB-INF\lib
    Copying 1 file to C:\Documents and Settings\sandeep.e\ws\HiWS\build\web\WEB-INF\lib
    Copying 1 file to C:\Documents and Settings\sandeep.e\ws\HiWS\build\web\WEB-INF\lib
    Copying 1 file to C:\Documents and Settings\sandeep.e\ws\HiWS\build\web\WEB-INF\lib
    Copying 1 file to C:\Documents and Settings\sandeep.e\ws\HiWS\build\web\WEB-INF\lib
    Copying 1 file to C:\Documents and Settings\sandeep.e\ws\HiWS\build\web\WEB-INF\lib
    Copying 1 file to C:\Documents and Settings\sandeep.e\ws\HiWS\build\web\WEB-INF\lib
    Copying 1 file to C:\Documents and Settings\sandeep.e\ws\HiWS\build\web\WEB-INF\lib
    Copying 1 file to C:\Documents and Settings\sandeep.e\ws\HiWS\build\web\WEB-INF\lib
    Copying 1 file to C:\Documents and Settings\sandeep.e\ws\HiWS\build\web\WEB-INF\lib
    Copying 1 file to C:\Documents and Settings\sandeep.e\ws\HiWS\build\web\WEB-INF\lib
    Copying 1 file to C:\Documents and Settings\sandeep.e\ws\HiWS\build\web\WEB-INF\lib
    Copying 1 file to C:\Documents and Settings\sandeep.e\ws\HiWS\build\web\WEB-INF\lib
    Copying 1 file to C:\Documents and Settings\sandeep.e\ws\HiWS\build\web\WEB-INF\lib
    Copying 1 file to C:\Documents and Settings\sandeep.e\ws\HiWS\build\web\WEB-INF\lib
    Copying 1 file to C:\Documents and Settings\sandeep.e\ws\HiWS\build\web\WEB-INF\lib
    Copying 1 file to C:\Documents and Settings\sandeep.e\ws\HiWS\build\web\WEB-INF\lib
    Copying 1 file to C:\Documents and Settings\sandeep.e\ws\HiWS\build\web\WEB-INF\lib
    Copying 1 file to C:\Documents and Settings\sandeep.e\ws\HiWS\build\web\WEB-INF\lib
    Copying 1 file to C:\Documents and Settings\sandeep.e\ws\HiWS\build\web\WEB-INF\lib
    Copying 1 file to C:\Documents and Settings\sandeep.e\ws\HiWS\build\web\WEB-INF\lib
    Copying 1 file to C:\Documents and Settings\sandeep.e\ws\HiWS\build\web\WEB-INF\lib
    Copying 1 file to C:\Documents and Settings\sandeep.e\ws\HiWS\build\web\WEB-INF\lib
    Copying 1 file to C:\Documents and Settings\sandeep.e\ws\HiWS\build\web\WEB-INF\lib
    Copying 1 file to C:\Documents and Settings\sandeep.e\ws\HiWS\build\web\WEB-INF\lib
    Copying 1 file to C:\Documents and Settings\sandeep.e\ws\HiWS\build\web\WEB-INF\lib
    library-inclusion-in-manifest:
    Compiling 3 source files to C:\Documents and Settings\sandeep.e\ws\HiWS\build\web\WEB-INF\classes
    Copying 1 file to C:\Documents and Settings\sandeep.e\ws\HiWS\build\web\WEB-INF\classes
    Copying 3 files to C:\Documents and Settings\sandeep.e\ws\HiWS\build\web
    Copying 1 file to C:\Documents and Settings\sandeep.e\ws\HiWS\build\web
    wscompile-init:
    C:\Documents and Settings\sandeep.e\ws\HiWS\nbproject\build-impl.xml:226: taskdef class com.sun.xml.rpc.tools.ant.Wscompile cannot be found
    BUILD FAILED (total time: 10 seconds)
    Can anyone please telll me why this is happening? The jar files necessary is present in the library, eventhough it is showing the error.
    Thanks in anticipation

    This is a forum for matters concerning the Java programming language, not for the NetBeans IDE. Try to find a NetBeans forum for your NetBeans problems.
    I believe there's one on nabble.com and another on java-forums.org.
    db

  • MySQL has run out of memory ::Help needed::

    ::Help needed::
    I've created a PHP web application in Dreamweaver, which uses a MySQL database, containing 14 tables.
    On one page, I use a an SQL query to select data from 10 of the tables in the database.
    However, when I try to preview the page in a browser, a PHP warning stating that the MySQL engine has run out of memory.
    Is there a way of increasing the Memory Cache of the engine, or a way to optimize the performance?

    Is this happening locally?
    If it is, try rebooting your system and see if this fixes the problem. If not then you have a problem with your code. If it works locally but not on the server, then you know it's not something in your code causing the issue, so you can confidently go to your host support and have them sort it out.
    With any such situation, testing locally first is a vital debugging step.
    Hope this gives you a path to follow.
    Lawrence   *Adobe Community Expert*
    www.Cartweaver.com
    Complete Shopping Cart Application for
    Dreamweaver, available in ASP, PHP and CF
    www.twitter.com/LawrenceCramer

  • Basic java problem help needed please

    the problem is :
    to produce a program which will show membership rates for a golf club..
    membership yearly rate new member joining fee
    category
    full 650 3000
    associate 200
    ladies 350 2000
    under 18 175
    new members must pay a joining fee in addition to the yearly rate as shown
    full/ladies members also prepay 150
    write a program which will enter details of members,calculate and output the total amount each member should pay.
    output number of members in each category
    the total income for each category....
    i need this program to show each category individually...cant do it at all..been at it a week....must be me && and || signs...i think...plz can someone help me as im really stuck now...thank you so much..
    import java.util.Scanner;
    public class assignmentquestion3 {
    public static Scanner key=new Scanner(System.in);
    public static void main(String []args){
    int fullfee=800,newfullfee=3800,associatefee=200,newla diesfee= 2350,ladiesfee= 350,under18fee = 175;
    int selectcat=0;
    int reply = 0;
    int addmember=0;
    int currentfulltotalmem=0,newfulltotalmem=0,associatet otalmem=0,ladiestotalmem=0,under18totalmem=0;
    int assoctotalcash=0,ladiestotalcash=0,under18totalcas h=0;
    int fullprepay=150;
    int ladiesfull=2500;
    int completefull = 0;
    int ladiescurrent=500;
    int under18=175;
    //Main introduction screen for the user and selections available. do while loops only allowing numbers 1,2,3 or 4.
    do{
    do{
    System.out.printf("\n\t %90s","********************Membership Rates For The Golf Club********************");
    System.out.printf("\n\n %105s","This program will allow users to enter details of members as well as calculating and.");
    System.out.printf("\n%106s","outputing the total amount each member should pay. The program allows users to view the");
    System.out.printf("\n%106s","total number of members in each category and the total income for each category.");
    System.out.printf("\n\n\t %75s","Please select your membership category: ");
    System.out.printf("\n\n\t %68s","Please press '1' for FULL");
    System.out.printf("\n\n\t %68s","Please press '2' for ASSOCIATE");
    System.out.printf("\n\n\t %68s","Please press '3' for LADIES");
    System.out.printf("\n\n\t %68s","Please press '4' for UNDER 18");
    System.out.printf("\n\n\t %68s","Please enter 1,2,3 or 4: ");
    selectcat=key.nextInt();
    }while (selectcat>4 || selectcat<1);
    do{
    System.out.printf("\n\n\t %75s","Are you a Current Member (press 1) or a New Member (press 2): ");
    reply=key.nextInt();
    }while (reply<1 || reply>2);
    //if number '1' for 'FULL' category is selected by the user and reply is 'yes'(1) then new full member fee is shown to user
    if (selectcat==1 ||reply==1)
    System.out.printf("\n\n\t %68s","CURRENT FULL MEMBERSHIP SELECTED");
    System.out.printf("\n\n\t %68s","Current full membership fees yearly are "+fullfee+"");
    System.out.printf("\n\n\t %68s","Full members must also pre-pay "+fullprepay+" on a card can be used in the club facilities such as bar and shop ");
    System.out.printf("\n\n\t %72s","The total of this membership is: "+fullfee+"");
    currentfulltotalmem=currentfulltotalmem+1;
    System.out.printf("\n\n\t %72s","The total number of 'CURRENT FULL MEMBERSHIPS = "+currentfulltotalmem+"");
    completefull=completefull+fullfee;
    System.out.printf("\n\n\t %68s","The total amount of income for 'FULL MEMBERSHIPS' within the club = "+completefull+"");
    //if number '1' is selected by the user and reply is 'no' (2) then full member fee is shown to user
    else if (selectcat==1 &&reply==2)
    System.out.printf("\n\n\t %68s","NEW FULL MEMBERSHIP SELECTED");
    System.out.printf("\n\n\t %68s","Full membership fees yearly are "+newfullfee+"");
    newfulltotalmem=newfulltotalmem+1;
    System.out.printf("\n\n\t %68s","The total number of 'NEW FULL MEMBERSHIPS = "+newfulltotalmem+"");
    completefull=completefull+newfullfee;
    System.out.printf("\n\n\t %68s","The total amount of income for 'FULL MEMBERSHIPS' within the club = "+completefull+"");
    //if number '2' is selected by the user then associate member fee is shown to user
    if (selectcat==2 &&(reply==1 || reply==2))
    System.out.printf("\n\n\t %75s","ASSOCIATE MEMBERSHIP SELECTED");
    System.out.printf("\n\n\t %75s","ASSOCIATE membership fees yearly are "+associatefee+"");
    associatetotalmem=associatetotalmem+1;
    System.out.printf("\n\n\t %75s","The total number of 'ASSOCIATE MEMBERSHIPS' WITHIN THE CLUB = "+associatetotalmem+"");
    assoctotalcash=assoctotalcash+associatefee;
    System.out.printf("\n\n\t %68s","The total amount of income for 'ASSOCIATE MEMBERSHIPS' within the club = "+assoctotalcash+"");
    //if number '3' is selected by the user and reply is 'yes' then new ladies member fee is shown to user
    if (selectcat==3 &&reply==1)
    System.out.printf("\n\n\t %68s","LADIES CURRENT MEMBERSHIP SELECTED");
    System.out.printf("\n\n\t %68s","Ladies full membership fees yearly are "+ladiesfee+"");
    System.out.printf("\n\n\t %68s","Ladies must also pre-pay "+fullprepay+" on a card can be used in the club facilities such as bar and shop ");
    System.out.printf("\n\n\t %68s","The total of this membership is: "+ladiescurrent+"");
    ladiestotalmem=ladiestotalmem+1;
    System.out.printf("\n\n\t %75s","The total number of 'LADIES MEMBERSHIPS' WITHIN THE CLUB = "+ladiestotalmem+"");
    ladiestotalcash=ladiestotalcash+ladiescurrent;
    System.out.printf("\n\n\t %68s","The total amount of income for 'LADIES MEMBERSHIPS' within the club = "+ladiestotalcash+"");
    //if number '3' is selected by the user and reply is 'no' then the current ladies member fee is shown to user
    else
    if (selectcat==3 && reply==2)
    System.out.printf("\n\n\t %68s","LADIES NEW MEMBERSHIP SELECTED");
    System.out.printf("\n\n\t %68s","LADIES NEW MEMBERSHIP fees yearly are "+newladiesfee+"");
    System.out.printf("\n\n\t %68s","Ladies must also pre-pay "+fullprepay+" on a card can be used in the club facilities such as bar and shop ");
    System.out.printf("\n\n\t %68s","The total of this membership is: "+ladiesfull+"");
    ladiestotalmem=ladiestotalmem+1;
    System.out.printf("\n\n\t %75s","The total number of 'LADIES MEMBERSHIPS' within the club = "+ladiestotalmem+"");
    ladiestotalcash=ladiestotalcash+ladiesfull;
    System.out.printf("\n\n\t %68s","The total amount of income for 'LADIES MEMBERSHIPS' within the club = "+ladiestotalcash+"");
    //if number '4' is selected by the user then under 18 member fee is shown to user
    else if (selectcat==4 &&(reply==1||reply==2))
    System.out.printf("\n\n\t %75s","UNDER 18 MEMBERSHIP SELECTED");
    System.out.printf("\n\n\t %75s","UNDER 18 yearly membership fees are "+under18fee+"");}
    System.out.printf("\n\n\t %68s","The total of this membership is: "+under18+"");
    under18totalmem=under18totalmem+1;
    System.out.printf("\n\n\t %75s","The total number of 'UNDER 18 MEMBERSHIPS' within the club = "+under18totalmem+"");
    under18totalcash=under18totalcash+under18;
    System.out.printf("\n\n\t %68s","The total amount of income for 'UNDER 18 MEMBERSHIPS' within the club = "+under18totalcash+"");
    //allowing user to select '0' to add another member or any other key to exit program
    System.out.printf("\n\n\t %68s","Please Press '0' to add another member or any other key to exit.: ");
    addmember=key.nextInt();
    }while (addmember==0 ||addmember>1);}}
    the problem im having is whenever i make the choices 1,2,3,4 (CATEgorys) AND hit 1 or 2(current or new member selections) it brings up more than one category...
    for example when i hit 1(Category full) and 1(current member)..it displays this:
    Are you a Current Member (press 1) or a New Member (press 2): 1
    CURRENT FULL MEMBERSHIP SELECTED
    Current full membership fees yearly are 800
    Full members must also pre-pay 150 on a card can be used in the club facilities such as bar and shop
    The total of this membership is: 800
    The total number of 'CURRENT FULL MEMBERSHIPS = 1
    The total amount of income for 'FULL MEMBERSHIPS' within the club = 800
    The total of this membership is: 175
    The total number of 'UNDER 18 MEMBERSHIPS' within the club = 1
    The total amount of income for 'UNDER 18 MEMBERSHIPS' within the club = 175
    Please Press '0' to add another member or any other key to exit.:
    under 18 membership as well?...does this for other selections too...is it my arithmetic operators?....my if loops?...

    Multi-post [http://forums.sun.com/thread.jspa?threadID=5346248&messageID=10498270#10498270]
    And it still doesn't compile.

  • Importing XML into Java.  Help needed Please!!!

    Hi,
    I have downloaded j2sdk1.4.1_05 and want to configure it to import XML files into a DOM in Java. I am having trouble doing this and need help. I read that version 1.4 support JAXP 1.1 but I am having trouble finding the JAXP-api.jar file. It says to put all the other Jar files into a folder and leave the JAXP-api.jar.
    Could you please tell me how to set up Java so that I can import an XML file. I also downloaded JAXP 1.2. But there seems to be no installer.
    Thanx John

    You can learn about reading xml in java by reading the J2EE tutorial at
    http://java.sun.com/j2ee/1.4/docs/tutorial/doc/
    Here is sample program to read XML file into a DOM taken from this tutorial
    (http://java.sun.com/j2ee/1.4/docs/tutorial/doc/JAXPXSLT4.html)
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.parsers.FactoryConfigurationError;
    import javax.xml.parsers.ParserConfigurationException;
    import org.xml.sax.SAXException;
    import org.xml.sax.SAXParseException;
    import org.w3c.dom.Document;
    import org.w3c.dom.DOMException;
    import java.io.*;
    public class TransformationApp
      static Document document;
      public static void main(String argv[])
        if (argv.length != 1) {
          System.err.println (
            "Usage: java TransformationApp filename");
          System.exit (1);
        DocumentBuilderFactory factory =
          DocumentBuilderFactory.newInstance();
        //factory.setNamespaceAware(true);
        //factory.setValidating(true);
        try {
          File f = new File(argv[0]);
          DocumentBuilder builder =
            factory.newDocumentBuilder();
          document = builder.parse(f);
        } catch (SAXParseException spe) {
          // Error generated by the parser
          System.out.println("\n** Parsing error"
            + ", line " + spe.getLineNumber()
            + ", uri " + spe.getSystemId());
          System.out.println("  " + spe.getMessage() );
          // Use the contained exception, if any
          Exception x = spe;
          if (spe.getException() != null)
            x = spe.getException();
          x.printStackTrace();
        } catch (SAXException sxe) {
          // Error generated by this application
          // (or a parser-initialization error)
          Exception x = sxe;
          if (sxe.getException() != null)
            x = sxe.getException();
          x.printStackTrace();
        } catch (ParserConfigurationException pce) {
          // Parser with specified options can't be built
          pce.printStackTrace();
        } catch (IOException ioe) {
          // I/O error
          ioe.printStackTrace();
      } // main
    } If you have java 1.4 sdk installed everything should compile and run. Separate
    JAXP package is nor required - JAXP is included in rt.jar in java-home-directory/jre/lib.

  • Java help needed(PLEASE)

    I have a Question for all you gifted people:
    I am designing a sort of quiz which takes questions and three possible answers from a database(which also holds the real answer).It prints these on the dos screen and I then have a System.in statement which allows the user to enter his or her answer (eg A,B,C or 1,2,3). I need a way of adding up the score at the end!!I was thinking of storing there answers in an array and compairing there answer to my correct answer in the database and if it is the same add 1 and if it not the same add 0???
    How would i write the System.in answers into an array and add them up???
    These are my thoughts on how to do this i would love to hear yours!! And also a help with writing the code for the above system of scoreing would be GREATLY appriciated!!
    thanks everyone,
    james.

    As mathuoa pointed out, since you already display the 3 possible answers to the user, get them into an array and display them on the screen. Then, as the user enters an answer, compare them with the three answers and if it is correct, update the score variable as such. If you want the history of answers that the user has given, then u will have to use a Vector/List/some such collection object to hold the user's answers.
    java.util.Vector answers = new java.util.Vector();
    answers.add(usersAnswer1);
    answers.add(usersAnswer2);
    Then, to get the entries,
    for(Enumeration e = answers.elements(); e.hasMoreElements();)
    System.out.println(e.nextElement());
    //Do something with the answer.
    This is one possible way of getting the answers from the user!

  • JAVA SOUND APPLICATION not applet.....help needed.....cheers

    hey there people heres the deal I need to complete this before 5 today but im completely stumped...we have to make a sound file player with a swing interface I have it playing(kind of!) but where now...I would be forever in your debt as my masters degree hangs in the balance! de de duhhhh! cheers
    iT WORKS ALRIGHT JUST NEED STOP PAUSE BUTTON FUNCTION..........
    import java.awt.*;
    import javax.swing.*;
    import java.awt.event.*;
    import java.io.*;
    import javax.swing.event.*;
    import java.io.File;
    import java.io.IOException;
    import javax.sound.sampled.*;
    import javax.sound.sampled.AudioFormat;
    import javax.sound.sampled.AudioInputStream;
    import javax.sound.sampled.AudioSystem;
    import javax.sound.sampled.Clip;
    import javax.sound.sampled.DataLine;
    import javax.sound.sampled.LineEvent;
    import javax.sound.sampled.LineListener;
    import javax.sound.sampled.LineUnavailableException;
    public class AudioPlayer extends JFrame implements ActionListener, ChangeListener{
    boolean playing;
    boolean looping;
    String filename = File.separator+"tmp";
    File selFile;
    Clip clip;
    JFileChooser fc = new JFileChooser();
    JButton btnOpen = new JButton("Open");
    JButton btnPlay = new JButton("Play");
    JButton btnStop = new JButton("Stop");
    JButton btnPause = new JButton("Pause");
    JButton btnLoop = new JButton("Loop");
    JSlider volume = new JSlider(SwingConstants.HORIZONTAL,0,100,0);
    JSlider panning = new JSlider(SwingConstants.HORIZONTAL,0,100,0);
    public AudioPlayer(){
    Container contentPane = getContentPane();
    contentPane.setLayout(new FlowLayout());
    contentPane.add(btnOpen);btnPlay.addActionListener(this);
    contentPane.add(btnPlay);btnPlay.addActionListener(this);
    contentPane.add(btnStop);btnStop.addActionListener(this);
    contentPane.add(btnPause);btnPause.addActionListener(this);
    contentPane.add(btnLoop);btnLoop.addActionListener(this);
    // Show open dialog; this method does not return until the dialog is closed
    fc.showOpenDialog(this);
    selFile = fc.getSelectedFile();
    volume.addChangeListener(this);
    panning.addChangeListener(this);
    volume.putClientProperty("JSlider.isFilled", Boolean.TRUE);
    volume.setPaintTicks(true);volume.setPaintLabels(true);
    volume.setMajorTickSpacing(20);volume.setMinorTickSpacing(10);
    contentPane.add(volume);
    panning.putClientProperty("JSlider.isFilled", Boolean.TRUE);
    panning.setPaintTicks(true);panning.setPaintLabels(true);
    panning.setMajorTickSpacing(20);panning.setMinorTickSpacing(10);
    contentPane.add(panning);
    addWindowListener(
    new WindowAdapter () {
    public void windowClosing(WindowEvent e){
    setVisible(false);
    public void actionPerformed(ActionEvent e){
    int returnVal = JFileChooser.APPROVE_OPTION;
    //Handle open file action.
    if (e.getSource() == btnOpen)
    System.out.println("FA1");
    returnVal = fc.showOpenDialog(AudioPlayer.this);
    if (returnVal == JFileChooser.APPROVE_OPTION)
    { selFile = fc.getSelectedFile();
    //This is where a real application would open the file.
    else
    if(e.getSource() == btnPlay)
    playAudio();
    public void stateChanged(ChangeEvent e)
    public static void main(String[] args)
    AudioPlayer audioPlayer = new AudioPlayer();
    audioPlayer.setSize(400,400);
    audioPlayer.show();
    public void playAudio ()
    playing = true;
    AudioInputStream audiosource = null;
    try
    audiosource = AudioSystem.getAudioInputStream(selFile);
    System.out.println("here");
    //System.out.println(audiosource.getFormat());
    DataLine.Info dataLineInfo = new DataLine.Info(Clip.class,audiosource.getFormat());
    clip = (Clip)AudioSystem.getLine(dataLineInfo);
    clip.open(audiosource);
    catch (UnsupportedAudioFileException e)
    catch (LineUnavailableException e)
    catch (IOException e)
    //catch (Exception e) {}
    if (looping)
    clip.loop(clip.LOOP_CONTINUOUSLY);
    else
    clip.loop(0);
    playing = false;
    }

    You have not added the actionListener to all the button D'oh
    import java.awt.*;
    import javax.swing.*;
    import java.awt.event.*;
    import java.io.*;
    import javax.swing.event.*;
    import javax.sound.sampled.*;
    * Description of the Class
    *@author rsmazara
    *@created 28 February 2003
    public class AudioPlayer extends JFrame implements ActionListener, ChangeListener {
    File selFile;
    JFileChooser fc = new JFileChooser();
    JButton btnOpen = new JButton( "Open" );
    JButton btnPlay = new JButton( "Play >" );
    JButton btnStop = new JButton( "Stop" );
    JButton btnPause = new JButton( "Pause ||" );
    JCheckBox btnLoop = new JCheckBox( "Loop" );
    JSlider volume = new JSlider( SwingConstants.HORIZONTAL, 0, 100, 0 );
    JSlider panning = new JSlider( SwingConstants.HORIZONTAL, 0, 100, 0 );
    JLabel label = new JLabel( " " );
    public AudioPlayer() {
    Container contentPane = getContentPane();
    contentPane.setLayout( new FlowLayout() );
    btnOpen.addActionListener( this );
    contentPane.add( btnOpen );
    btnPlay.addActionListener( this );
    contentPane.add( btnPlay );
    btnPlay.addActionListener( this );
    contentPane.add( btnStop );
    btnStop.addActionListener( this );
    contentPane.add( btnPause );
    btnPause.addActionListener( this );
    contentPane.add( btnLoop );
    btnLoop.addActionListener( this );
    btnPlay.setEnabled( false );
    btnStop.setEnabled( false );
    btnPause.setEnabled( false );
    // Show open dialog; this method does not return until the dialog is closed
    // fc.showOpenDialog( this );
    // selFile = fc.getSelectedFile();
    volume.addChangeListener( this );
    panning.addChangeListener( this );
    volume.putClientProperty( "JSlider.isFilled", Boolean.TRUE );
    volume.setPaintTicks( true );
    volume.setPaintLabels( true );
    volume.setMajorTickSpacing( 20 );
    volume.setMinorTickSpacing( 10 );
    contentPane.add( volume );
    panning.putClientProperty( "JSlider.isFilled", Boolean.TRUE );
    panning.setPaintTicks( true );
    panning.setPaintLabels( true );
    panning.setMajorTickSpacing( 20 );
    panning.setMinorTickSpacing( 10 );
    contentPane.add( panning );
    contentPane.add( label );
    addWindowListener(
    new WindowAdapter() {
    public void windowClosing( WindowEvent e ) {
    setVisible( false );
    System.exit( -100 );
    public void actionPerformed( ActionEvent e ) {
    int returnVal = JFileChooser.APPROVE_OPTION;
    //Handle open file action.
    System.out.println( e.getActionCommand() );
    ///open
    if ( e.getSource() == btnOpen ) {
    System.out.println( "FA1" );
    returnVal = fc.showOpenDialog( AudioPlayer.this );
    if ( returnVal == JFileChooser.APPROVE_OPTION ) {
    selFile = fc.getSelectedFile();
    player = new Player( selFile );
    label.setText( "File loaded : " + selFile.getAbsolutePath() );
    btnPlay.setEnabled( true );
    btnStop.setEnabled( false );
    btnPause.setEnabled( false );
    //This is where a real application would open the file.
    } else {
    //play
    if ( e.getSource() == btnPlay ) {
    player.go( btnLoop.isSelected() );
    btnPlay.setEnabled( false );
    btnStop.setEnabled( true );
    btnPause.setEnabled( true );
    // playAudio();
    // pause
    if ( e.getSource() == btnPause ) {
    player.pause();
    btnPlay.setEnabled( true );
    btnStop.setEnabled( true );
    btnPause.setEnabled( false );
    if ( e.getSource() == btnStop ) {
    player.finish();
    btnPlay.setEnabled( true );
    btnStop.setEnabled( false );
    btnPause.setEnabled( false );
    public void stateChanged( ChangeEvent e ) {
    private Player player = null;
    public static void main( String[] args ) {
    AudioPlayer audioPlayer = new AudioPlayer();
    audioPlayer.setSize( 400, 400 );
    audioPlayer.show();
    * Description of the Class
    *@author rsmazara
    *@created 28 February 2003
    class Player {
    Clip clip;
    private java.io.File selectedFile = null;
    private boolean looping = false;
    public Player( File file ) {
    selectedFile = file;
    AudioInputStream audiosource = null;
    try {
    audiosource = AudioSystem.getAudioInputStream( selectedFile );
    System.out.println( "here" );
    //System.out.println(audiosource.getFormat());
    DataLine.Info dataLineInfo = new DataLine.Info( Clip.class, audiosource.getFormat() );
    clip = ( Clip ) AudioSystem.getLine( dataLineInfo );
    clip.open( audiosource );
    } catch ( UnsupportedAudioFileException e1 ) {
    e1.printStackTrace();
    } catch ( LineUnavailableException e2 ) {
    e2.printStackTrace();
    } catch ( IOException e3 ) {
    e3.printStackTrace();
    private boolean work = false;
    public void go( boolean loop ) {
    looping = loop;
    playAudio();
    public void finish() {
    clip.stop();
    public boolean isWorking() {
    return clip.isRunning();
    long pausePosition = ( long ) 0;
    public void pause() {
    pausePosition = clip.getMicrosecondPosition();
    clip.stop();
    public void restart() {
    clip.setMicrosecondPosition( pausePosition );
    playAudio();
    public void loop( boolean loop ) {
    looping = loop;
    private void playAudio() {
    if ( looping ) {
    clip.loop( clip.LOOP_CONTINUOUSLY );
    } else {
    clip.loop( 0 );

  • Momentary punch in/out foot switch help needed

    Hi all,
    I'm looking to find a usb keyboard or device that i can use with LOGIC 9 to plug in a momentary punch in/out foot switch.
    I have an M-Audio Oxygen 61 - but I can't tell if it  has the input or not?
    Thanks in advance

    I might approach it like this..... Open your template song. In the environment, create a new transformer and check the box next to the icon in the inspector so that it shows up as a possible arrange track. Double click the transformer to open it and program it to transform sus pedal (cc#64 I think...) to some other unused controller. Select the transformer track in the arrange page, open your key commands and set the transformed cc data to the record toggle (delete the original sus pedal setting from the controller list). Save the template song with this transformer and arrangement with the transformer track in it. Now when you build a new song from the template, you can select the transformer track when you want to use the pedal for record toggle, and select the appropriate instrument's track when you  want the sus pedal.
    There are probably other (better?) ways of doing this.. one of the best things about logic..... Perhaps some one else will offer up a simpler way. It might just be easier to open KC window and delete the sus/rec. toggle setting when you don't need it and just reprogram it when you do.....

  • Java Server Chat, Help Needed PLEASE!! - NullPointerException

    Hi i am having problem with my java chat. when i go to load it i get a NullPointerException i know what code is causeing the problem but im not quite sure what it does can u explain to me please. Ive been looking at this error trying to fix it for a few weeks now and its annoying. Thank you for any help. Here is the code that causes the NullPointerException
         public static final void j()
            try
                String as[] = {
                    "ar", "aq", "ao"
                Class class1;
                Object obj = (class1 = Class.forName((new StringBuilder()).append(com/diginet/oldchat/server/g.getPackage().getName()).append(".an").toString())).getMethod(as[0], new Class[0]);
                if(q)
                    obj = ((Method) (obj)).invoke(null, new Object[0]);
                    Class aclass[];
                    (aclass = new Class[1])[0] = java/lang/String;
                    Object aobj[];
                    (aobj = new Object[1])[0] = obj;
                    for(int i1 = 1; i1 < as.length; i1++)
                        Method method;
                        (method = class1.getMethod(as[i1], aclass)).invoke(null, aobj);
                    q = false;
                return;
            catch(Exception _ex)
                ChatServer.q_java_util_Vector_static_fld = new Vector();
            ChatServer.q_com_diginet_digichat_common_SerialInfo_static_fld = null;
        }If part of the program uses
    com.diginet.oldchat.server.g.j();wich will load the code above it always gives NullPointerException and then wont continue loading what is wrong? Please help me
    Oh and by the way this is my first post on this forum and i found it quite easy to use!
    Please please please help me thnk youuu

    Ok here is what u asked for. Oh and by the way im running this from CMD so wilse the Chat Server is loading i can do the Stack Trace just as its trying to do what it does after saying "Expires On:" (Wich after gives NullPointerException) once the errors come on the screen i cant get a stack trace anymore by useing {CTRL} + Break. but i still hope this can help u :)
    *2009-05-07 22:23:30*
    Full thread dump Java HotSpot(TM) Client VM (11.3-b02 mixed mode, sharing):
    *"Low Memory Detector" daemon prio=6 tid=0x02a7e000 nid=0xbcc runnable [0x0000000*
    *0..0x00000000]*
    java.lang.Thread.State: RUNNABLE
    *"CompilerThread0" daemon prio=10 tid=0x02a7b000 nid=0xd80 waiting on condition [*
    *0x00000000..0x02d2f9c0]*
    java.lang.Thread.State: RUNNABLE
    *"Attach Listener" daemon prio=10 tid=0x02a79800 nid=0x270 runnable [0x00000000..*
    *0x00000000]*
    java.lang.Thread.State: RUNNABLE
    *"Signal Dispatcher" daemon prio=10 tid=0x02a78400 nid=0x224 waiting on condition*
    *[0x00000000..0x00000000]*
    java.lang.Thread.State: RUNNABLE
    *"Finalizer" daemon prio=8 tid=0x02a73400 nid=0xf60 in Object.wait() [0x02c3f000.*
    *.0x02c3fa94]*
    java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    - waiting on <0x22a80288> (a java.lang.ref.ReferenceQueue$Lock)
    at java.lang.ref.ReferenceQueue.remove(Unknown Source)
    - locked <0x22a80288> (a java.lang.ref.ReferenceQueue$Lock)
    at java.lang.ref.ReferenceQueue.remove(Unknown Source)
    at java.lang.ref.Finalizer$FinalizerThread.run(Unknown Source)
    *"Reference Handler" daemon prio=10 tid=0x02a6ec00 nid=0xe2c in Object.wait() [0x*
    *02bef000..0x02befb14]*
    java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    - waiting on <0x22a80310> (a java.lang.ref.Reference$Lock)
    at java.lang.Object.wait(Object.java:485)
    at java.lang.ref.Reference$ReferenceHandler.run(Unknown Source)
    - locked <0x22a80310> (a java.lang.ref.Reference$Lock)
    *"main" prio=6 tid=0x002b6400 nid=0x6b0 runnable [0x0090f000..0x0090fe54]*
    java.lang.Thread.State: RUNNABLE
    at java.net.Inet4AddressImpl.lookupAllHostAddr(Native Method)
    at java.net.InetAddress$1.lookupAllHostAddr(Unknown Source)
    at java.net.InetAddress.getAddressFromNameService(Unknown Source)
    at java.net.InetAddress.getAllByName0(Unknown Source)
    at java.net.InetAddress.getAllByName(Unknown Source)
    at java.net.InetAddress.getAllByName(Unknown Source)
    at java.net.InetAddress.getByName(Unknown Source)
    at java.net.InetSocketAddress.<init>(Unknown Source)
    at sun.net.NetworkClient.doConnect(Unknown Source)
    at sun.net.www.http.HttpClient.openServer(Unknown Source)
    at sun.net.www.http.HttpClient.openServer(Unknown Source)
    - locked <0x229fac68> (a sun.net.www.http.HttpClient)
    at sun.net.www.http.HttpClient.<init>(Unknown Source)
    at sun.net.www.http.HttpClient.New(Unknown Source)
    at sun.net.www.http.HttpClient.New(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown
    Source)
    at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Sour
    ce)
    at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown So
    urce)
    - locked <0x229f4118> (a sun.net.www.protocol.http.HttpURLConnection)
    at java.net.URL.openStream(Unknown Source)
    at com.diginet.oldchat.server.an.w(Unknown Source)
    at com.diginet.oldchat.server.an.ar(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at com.diginet.oldchat.server.g.j(Unknown Source)
    at com.diginet.digichat.server.ChatServer.<init>(Unknown Source)
    at com.diginet.digichat.server.ChatServer.main(Unknown Source)
    *"VM Thread" prio=10 tid=0x02a6d000 nid=0xe38 runnable*
    *"VM Periodic Task Thread" prio=10 tid=0x02a82c00 nid=0xa8 waiting on condition*
    JNI global references: 814
    Heap
    def new generation   total 960K, used 505K [0x22990000, 0x22a90000, 0x22e70000)
    eden space 896K,  49% used [0x22990000, 0x229fe4a0, 0x22a70000)
    from space 64K, 100% used [0x22a80000, 0x22a90000, 0x22a90000)
    to   space 64K,   0% used [0x22a70000, 0x22a70000, 0x22a80000)
    tenured generation   total 4096K, used 139K [0x22e70000, 0x23270000, 0x26990000
    the space 4096K,   3% used [0x22e70000, 0x22e92f88, 0x22e93000, 0x23270000)
    compacting perm gen  total 12288K, used 466K [0x26990000, 0x27590000, 0x2a99000
    *0)*
    the space 12288K,   3% used [0x26990000, 0x26a04b00, 0x26a04c00, 0x27590000)
    ro space 8192K,  63% used [0x2a990000, 0x2aea8810, 0x2aea8a00, 0x2b190000)
    rw space 12288K,  53% used [0x2b190000, 0x2b7fd300, 0x2b7fd400, 0x2bd90000)
    Thanks again an hope this helps.

  • Hi I'm trying to install photoshop on my new computer, but I can't figure it out. will you help me please?

    I purchased photoshop extended ver.12 a few yeas ago. Now, I got a new computer and I want to install the photoshop on that. I read some discussion and it said I need to download it from my purchase history or something, but I don't see anything there. Is there any other way to do this?

    For general advice see Troubleshooting issues with iTunes for Windows updates.
    The steps in the second box are a guide to removing everything related to iTunes and then rebuilding it which is often a good starting point unless the symptoms indicate a more specific approach. Review the other boxes and the list of support documents further down page in case one of them applies.
    Your library should be unaffected by these steps but there is backup and recovery advice elsewhere in the user tip.
    tt2

  • MBP vid out to tv help needed

    I just got the mini display port to vga for my new led screen 15" macbook pro. I have it on my tv and it works.
    How do I get this setup to work with the macbooc screen closed? When I connect my macbook pro to my tv I want to close the macbook screen, but when I do the laptop goes to sleep and shuts off the tv. What I want to do is use the tv sometimes instead of the screen on my macbook pro and have the mac switch to use only the tv not using the led screen in the macbook pro at all.
    The macbook pro sees the tv fine and identifies it fine too.
    Thanks guys. I really appreciate the help.

    Hi, Daniel. To have the TV operate as a monitor with the MBP's display closed, you must have an external keyboard and mouse and the MBP's AC adapter connected. See this article for instructions:
    http://support.apple.com/kb/HT3131

  • Urgent help needed please help me out

    i m trying to make a jar file for my package named as mainPanel
    but when i run the gcs.jar file it gives following error " failed to load mainclass menifest attribute from e:/gcs/mainPanel/gcs.jar"
    could you please explain me the procedure through an example for making a jar file for a package containing many subfolder.

    http://catb.org/esr/faqs/smart-questions.html#urgent

  • Help Needed in Creating Java Class and Java Stored Procedures

    Hi,
    Can anyone tell how can i create Java Class, Java Source and Java Resource in Oracle Database.
    I have seen the Documents. But i couldn't able to understand it correctly.
    I will be helpful when i get some Examples for creating a Java Class, Java Source and Stored Procedures with Java with details.
    Is that possible to Create a Java class in the oracle Database itself ?.
    Where are the files located for the existing Java Class ?..
    Help Needed Please.
    Thanks,
    Murali.v

    Hi Murali,
    Heres a thread which discussed uploading java source file instead of runnable code on to the database, which might be helpful :
    Configure deployment to a database to upload the java file instead of class
    The files for the java class you created in JDev project is located in the myworks folder in jdev, eg, <jdev_home>\jdev\mywork\Application1\Project1\src\project1
    Hope this helps,
    Sunil..

Maybe you are looking for