Text Listener

I'm having trouble finding a tutorial on adding a text listener. What I what to do is have the user input a file name and then the program can get data from that file. Is there a standard way of knowing when the user is done inputting, besides adding a button that says "Done"?
Thanks

The only way your program can know the user is done entering a value is if the user tells it so. In addition to a "Done" button, you can add an ActionListener to the JTextField itself:   field.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent evt) {
      // same as for "Done" button
  }); This action will be performed when the user presses Enter. A neater approach is to create an Action object that you attach to both the textfield and the button.
in the keyReleased event of text field.No. Never use KeyListeners on JTextFields. If you need to listen for changes in a text component, use a DocumentListener:   textField.getDocument().addDocumentListener(new DocumentListener() {
    public void insertUpdate(DocumentEvent evt) {
      doSomething();
    public void removeUpdate(DocumentEvent evt) {
      doSomething();
    public void changedUpdate(DocumentEvent evt) {
      // ignore this one
  }

Similar Messages

  • Is it possible to receive email notifications of incoming text msgs?

    This may sound like a dumb question, but I often leave my phone turned off while I'm at work and don't see that I got a text until I turn it back on (and with a Droid Mini, the time stamp is when you got it, not when it was sent, so I have no idea when it was sent).  Since I'm often at a computer with access to email, it would be nice if I could set up my phone to email me whenever someone sends me a text.  Obviously this wouldn't be very useful for most people that get many texts throughout the day, but I get very few, if any, so I wouldn't be overloaded with emails.

    Mighttext works great but requires the phone be left on, I am not sure about Message+ but it may be the same.  Another option if you sign up with a google voice number (for free) you can give out that number to people that you want to receive texts from during the day (yes it is a pain to have another number but depends on how many people you have texting you).  You can setup google voice to forward the messages to your phone anyway but they also show up on voice.google.com also.  Google voice number gives you lots of other cool features also (forwarding to multiple phone numbers, voicemail to text, listen in while person is leaving message and picking the phone call while leaving the message, can be setup such that caller must identify themselves before fowarding the call, etc.  I use my google voice as a home number so I can give it out without worry.  You can also selectively forward calls to voicemail directly or just disconnect or eve fake a disconnected number for those really annoying calls.

  • Loading swf with XML on Click

    Hi all, can anyone help
    can anyone shine a little light onto a little confusion I am having, I have a menu that already loads in images via an XML file on a menu, what I am trying to do is when an image/meni Item is click I would like to load in an swf into the same place as the image Item loads into! am I making any sense.
    on a click event, do I use in the XML file the <link>link to swf</link>   ????
    this is what I have in my xml file that loads in the images so far;
    <image name="image 12" path="img/img12.jpg"
    title="Lorem ipsum 12"
    text="Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi commodo 12" />
    what I am getting confused with is what I also put within the AS, I am sure it is not alot but I'm just not sure what needs to go where??
    this is what I have within the AS that loads in XML, I hope its ok to paste this code, never like posting to much code incase is scares people off, I just don't want to leave anything out, hope thats ok with everyone:eek:
    // Use URLLoader to load XML
    xmlLoader = new URLLoader();
    xmlLoader.dataFormat = URLLoaderDataFormat.TEXT;
    // Listen for the complete event
    xmlLoader.addEventListener(Event.COMPLETE, onXMLComplete);
    xmlLoader.load(new URLRequest("data.xml")); 
    stage.addEventListener( MouseEvent.MOUSE_WHEEL, onMouseWheel );
    //———————————————EVENT HANDLERS
    private function onXMLComplete(event:Event):void
    // Create an XML Object from loaded data
    var data:XML = new XML(xmlLoader.data);
    // Now we can parse it
    var images:XMLList = data.image;
    for(var i:int = 0; i < images.length(); i++)
    // Get info from XML node
    var imageName:String = images[i].@name;
    var imagePath:String = images[i].@path;
    var titles:String = images[i].@title;
    var texts:String = images[i].@text;
    // Load images using standard Loader
    var loader:Loader = new Loader();
    // Listen for complete so we can center the image
    loader.contentLoaderInfo.addEventListener(Event.COMPLETE,onImageComplete);
    loader.load(new URLRequest(imagePath));
    // Create a container for the loader (image)
    var holder:MovieClip = new MovieClip();
    holder.addChild(loader);
    var button_main:Button_mr = new Button_mr();   /
    holder.addChild(button_main);               
    var tooltip:ToolTip = new ToolTip();
    tooltip.field.text = titles;  //loads tooltip 1
    tooltip.field2.text = texts;  //loads tool tip 2
    tooltip.x = -350; 
    tooltip.y = 0;   
    holder.addChild(tooltip);
    // Same proceedure as before
    holder.buttonMode = true;
    holder.addEventListener( MouseEvent.CLICK, onMenuItemClick );
    // Add it to the menu
    circleMenu.addChild(holder);
    many thanks for any help!!!!

    1. Be sure in main.swf there is no masking or layering hiding
    the reflection area. A way to test quickly is to load in a plain
    master swf that is much larger than the externals swf.
    2. Know the weakness of loadMovie for timing issues that
    require the external movie to be fully loaded before actions are
    taken on it. I see a bunch of these in the code you posted. Best to
    use
    MovieClipLoader.onLoadInit
    before you attempt to access the external swf properties or code or
    add code.
    3. Be sure the code is firing on load and all objects are
    created. Add some trace statements for those objects.
    4. I noticed you do not use BitmapData so this may not be
    relevant but be sure to add
    System.security.allowDomain("*");
    to the main.swf as well as in external swfs and only if you
    are using the BitmapData class.
    5. As I started to look at the code a bit and noticed this
    item:
    There is no constructor for the Flash MovieClip class. You
    will not see a compiler error message because you do not have the
    code wrapped into a class.
    var home:MovieClip = new MovieClip();
    However it does not have impact on the code.
    better would be
    var home:MovieClip;

  • Challanging question about Threads.  Can anyone help?

    Hello,
    I've been learing how to use threads and I have run into a little rut. I am making a game that listens for clicks of the mouse on the board AND allows people to talk to each other in a chat box.
    I've made a chatThread and in the public void run() method I can do the following...
    public void run(){
    while(true){
    try{
    chatText.append(ServerIn.readLine()+"\n");
    catch (Exception h){}
    this pastes whatever the other person wrote into the public chattext area. now my problem is this. I need another thread that listens for button clicks. If the button is clicked on one side, the other side needs to be able to read that click and perform a certan task. I only have 1 thread running, but I have made an instatance of PrintWriter for the text and DataInputStream for the integer value. I have tried things like this and they really don't like me. (they cause faluts and whatnot)
    public void run(){
    while(true){
    try{
    chatText.append(ServerIn.readLine()+"\n");
    ServerIn2a.readInt();
    catch (Exception h){}
    Sometimes the integer will read into the ServerIn2a and then when i try to chat it can't read into the ServerIn varialble.
    Do I need to make two seperate thread and somehow pause one and run one, then pause the other?
    Thanks for your help!

    Ok, sorry, here is a better description of what my program looks like (the parts that concern this topic)...
    public class Game extends JApplet implements ActionListener, Runnable{
    PrintWriter ClientOut = null; // to send messages to the server
    BufferedReader ClientIn = null; // to receive messages from the server.
    PrintWriter ServerOut = null; // to send messages to the client
    BufferedReader ServerIn = null; // to receive messages from the client.
    DataInputStream ClientIn2a = null; // to send messages to the server
    DataOutputStream ClientOut2a = null; // to receive messages from the server.
    DataInputStream ServerIn2a = null; // to send messages to the client
    DataOutputStream ServerOut2a = null; // to receive messages from the client.
    //On the main screen, if they press the "host" button they become the host and the this happens.....
    //I want these two lines to read text from a dialog box and then pass that text to the other person      //playerinput from a dialog box so it can be passed
    ServerIn = new BufferedReader(new InputStreamReader(clientSocket.getInputStream()));
    ServerOut = new PrintWriter(clientSocket.getOutputStream(),true);
    //When they click on a button, I am trying to read the buttons coordinate which will be a Integer value. I //I want to get that integer value to the other person so I make these DataInput and Output variables.
    ServerIn2a = new DataInputStream(clientSocket.getInputStream());
    ServerOut2a = new DataOutputStream(clientSocket.getOutputStream());
    //now I made a thread that is always supposed to listen to perform the action of sending the text to
    //the appropriate text listener and to send the integer to the appropriate DATAINPUT listener.
    Thread ServerThread = new Thread(this)
    ServerThread.start();
    //on the main screen, if they press the client button......
    ClientIn = new BufferedReader(new InputStreamReader(serverSocket.getInputStream()));
    ClientOut = new PrintWriter(serverSocket.getOutputStream(),true);
    ClientIn2a = new DataInputStream(serverSocket.getInputStream());
    ClientOut2a = new DataOutputStream(serverSocket.getOutputStream());
    //now I made a thread that is always supposed to listen and perform the action to send the data to the
    //other person
    Thread clientThread = new Thread(this);
    clientThread.start( );
    //here is the actionPerformed method. They press enter in the text area box and this gets run.....
    if(player==1){
    //THE TEXT THEY TYPE FIRST GETS PASTED INTO THEIR OWN CHAT AREA
         chatText.append(HostUserName+": " + messageField.getText() + "\n");
         //NOW I WANT TO SEND WHEY THEY TYPE TO THE OTHER PERSON
    try{
    ServerOut.write(HostUserName+": " + messageField.getText()+"\n");
    ServerOut.flush(); }
    catch(Exception e){Mbox.showMessageDialog(null,"Chatting error","connect",1);}
    //here is my run method (this is where I think I am having my problems and that I need help with.
    public void run(){
         if(player == server){
         while(true){
         try{
         //THIS IS WHERE THE INTEGER SHOULD BE READ INTO
                   performAFucntion(ServerIn2a.readInt());}
              catch(Exception h){}
              //THIS TRY STATEMENT IS WHERE THE TEXT SHOULD BE READ
         try{   
              chatText.append(ServerIn.readLine()+"\n"); }
         catch (Exception h){}
    //ELSE YOU ARE THE OTHER PERSON AND YOU DO THE EXACT OPPOSITE OF ABOVE
    OK! Now that the code is out of the way. My problem.... Sometimes when I click on a button, the ineger value gets assigned to the ServerIn.reasline and funny symbols pop up in the other persons text area. And then when I try to type text in my text box after I get the wierd symbols into my chat text area, the CATCH (Exceptoin E) from my actionPerformed function that deals with sending the text gets activated and I see the dialog box that tells me there was an error.
    I THINK my error is in my run statement. I think everytime I write something, wether it be an integer or a text, the first .READLINE( ) that gets encountered in my run statement reads it. I think I have to have the WHILE(TRUE) statement or else it wont continuoulsy try to read in data.
    Can anyone tell me if I need to somehow make two threads, one that listens for the text and a seperate one that listens for the integer value?
    I hope this is a little bit more clearer than my last letters. Thanks for being patient with me.

  • Adding Pause and Replay Buttons

    Ok here is my script for an external XML loading Flash
    Gallery...
    1. How do I add a "constant" Pause and Replay on this?
    2. Every time I add something to the stage the "fade effect"
    affects that too!
    Thanks in advance.
    delay = 5000;
    function loadXML(loaded) {
    if (loaded) {
    xmlNode = this.firstChild;
    image = [];
    description = [];
    total = xmlNode.childNodes.length;
    for (i=0; i<total; i++) {
    image
    = xmlNode.childNodes.childNodes[0].firstChild.nodeValue;
    description
    = xmlNode.childNodes.childNodes[1].firstChild.nodeValue;
    id = setInterval(preloadPic, 100);
    } else {
    content = "file not loaded!";
    xmlData = new XML();
    xmlData.ignoreWhite = true;
    xmlData.onLoad = loadXML;
    xmlData.load("images.xml");
    var loadTot = 0;
    var k = 0;
    function preloadPic() {
    clearInterval(id);
    var con = picture.duplicateMovieClip("con"+k, 9984+k);
    con.loadMovie(image[k]);
    var temp = _root.createEmptyMovieClip("temp"+k, 99+k);
    temp.onEnterFrame = function() {
    var total = con.getBytesTotal();
    var loaded = con.getBytesLoaded();
    percent = Math.round((loaded/total*100)/image.length);
    preloader.preload_bar._xscale = loadTot+percent;
    info.text = "Loading picture "+k+" of "+image.length+"
    total";
    if (loaded == total && total>4) {
    con._visible = 0;
    nextPic();
    loadTot += percent;
    delete this.onEnterFrame;
    function nextPic() {
    if (k<image.length-1) {
    k++;
    preloadPic();
    else {
    firstImage();
    preloader._visible = 0;
    info.text = "";
    listen = new Object();
    listen.onKeyDown = function() {
    if (Key.getCode() == Key.LEFT) {
    prevImage();
    } else if (Key.getCode() == Key.RIGHT) {
    nextImage();
    Key.addListener(listen);
    previous_btn.onRelease = function() {
    prevImage();
    next_btn.onRelease = function() {
    nextImage();
    var p = 0;
    var current;
    MovieClip.prototype.fadeIn = function() {
    if (this._alpha<100) {
    current._alpha -= 5;
    this._alpha += 5;
    } else {
    current._visible = 0;
    delete this.onEnterFrame;
    function nextImage() {
    if(p<(total-1)){
    current = this["con"+p];
    p++;
    var picture = this["con"+p];
    picture._visible = 1;
    picture._alpha = 0;
    picture.onEnterFrame = fadeIn;
    desc_txt.text = description[p];
    picture_num();
    slideshow();
    if (isPaused == true) {
    current = this["con"+p];
    p<total-1 ? p++ : p=0;
    preloadPic();
    function prevImage() {
    if (p>0){
    current = this["con"+p];
    p--;
    var picture = this["con"+p];
    picture._visible = 1;
    picture._alpha = 0;
    picture.onEnterFrame = fadeIn;
    desc_txt.text = description[p];
    picture_num();
    function firstImage() {
    con0._visible = 1;
    con0._alpha = 0;
    con0.onEnterFrame = fadeIn;
    desc_txt.text = description[0];
    picture_num();
    slideshow();
    function picture_num() {
    current_pos = p+1;
    pos_txt.text = current_pos+" / "+total;
    function slideshow() {
    myInterval = setInterval(pause_slideshow, delay);
    function pause_slideshow() {
    clearInterval(myInterval);
    if (p == (total-1)) {
    //Resetting...fadeout=300 milliseconds.
    endFadeOut = setInterval(fadeOut, 300);
    //Try using a movie clip called restart_mc that is a button
    _root.attachMovie("restart_mc");
    } else {
    nextImage();
    Here is the Source Files:
    Download the
    Sources

    anyone?

  • Ok, does anyone know the correct way to do this

    Hi all
    would someone beable to explain the correct way of attaching dynamic text to a rotaing menu so that the text moves with the image as it rotates,
    I am now being told that in order to have dynamic text rotate/move I have to embed the font, by placing a text field on the stage outside my flash area and then set embedFonts property to true, and then apply a textformat.
    first, is this the correct way of doing it?
    second, can someone please explain(by breaking down into steps, as I am a newbie) how I go about setting embedFonts property to true and applying a textformat.
    what I have created;
    1.)I created a movieclip called 'textHolder' inside this has two dynamic text fields called 'headerText'  & 'bodyText'  <<<<< IS THIS CORRECT?
    2.)I have an xml file which will load the text in as well as the images with the rotating menu, see below;  <<<IS THIS CORRECT????
    <?xml version="1.0" encoding="utf-8"?>
    <data>
      <image name="image 1" path="img/img1.jpg"
        textHolder.headerText="Sunset"
        textHolder.bodyText="The hour of night is near, as the skies get blood-filled" />
    <data>
    3.What I am missing is what script I need for the main.as file, can anyone help here?
    so to break down.
    I have a rotating menu that is driven by xml, that loads images on the menu. I would also like to load text to the left of each image, and have the text be fixed with the image as it rotates.
    I can post the as, but I would like to know if the above is correct first, if you would like to see the main script please say.
    I have attached a jpg layout to give you an idea as to what I am trying to explain. can someone please help!!!!!!!!!
    (this is my previous post: http://forums.adobe.com/thread/463213?tstart=0  but I feel its got lost a little along the way)

    MY CURRENT SCRIPT, CAN YOU SEE HOW TO ATTACH THE TEXT WITH THE IMAGE?
    package 
    import flash.display.DisplayObject;
    import flash.display.MovieClip;
    import flash.display.Loader;
    import flash.display.Sprite;
    import flash.events.Event;
    import flash.events.MouseEvent;
    import flash.net.URLLoader;
    import flash.net.URLRequest;
    import flash.net.URLLoaderDataFormat;
    import soulwire.ui.CircleMenu;
    public class Main extends Sprite
      //————————————————————————————————————————————— CLASS MEMBERS  VALUE
      public var circleMenu:      CircleMenu;
      public var xmlLoader:      URLLoader;
      //——————————————————————————————————————————————— CONSTRUCTOR
      public function Main()
      circleMenu = new CircleMenu( 300, 32, 14 );
      circleMenu.x = 150;
      circleMenu.y = 300;
      addChildAt( circleMenu, 0 );
      // Use URLLoader to load XML
      xmlLoader = new URLLoader();
      xmlLoader.dataFormat = URLLoaderDataFormat.TEXT;
      // Listen for the complete event
      xmlLoader.addEventListener(Event.COMPLETE, onXMLComplete);
      xmlLoader.load(new URLRequest("data.xml"));
      /*for (var i:int = 0; i < 20; i++)
        // MyMenuItem can be a symbol from your library
        // or any class which extends DisplayObject!
        var item:MyMenuItem = new MyMenuItem();
        item.txt.text = 'Menu Item ' + (i + 1);
        item.txt.mouseEnabled = false;
        item.buttonMode = true;
        item.addEventListener( MouseEvent.CLICK, onMenuItemClick );
        circleMenu.addChild( item );
      circleMenu.currentIndex = 4;*/
      // Enable the mouse wheel
      stage.addEventListener( MouseEvent.MOUSE_WHEEL, onMouseWheel );
      // Set up the UI
      ui.spacingSlider.addEventListener( Event.CHANGE, onSliderChange );
      ui.radiusSlider.addEventListener( Event.CHANGE, onSliderChange );
      ui.minAlphaSlider.addEventListener( Event.CHANGE, onSliderChange );
      ui.minScaleSlider.addEventListener( Event.CHANGE, onSliderChange );
      ui.scaleSlider.addEventListener( Event.CHANGE, onSliderChange );
      ui.itemsSlider.addEventListener( Event.CHANGE, onSliderChange );
      ui.spacingSlider.dispatchEvent( new Event( Event.CHANGE) );
      ui.radiusSlider.dispatchEvent( new Event( Event.CHANGE) );
      ui.minAlphaSlider.dispatchEvent( new Event( Event.CHANGE) );
      ui.minScaleSlider.dispatchEvent( new Event( Event.CHANGE) );
      ui.scaleSlider.dispatchEvent( new Event( Event.CHANGE) );
      ui.itemsSlider.dispatchEvent( new Event( Event.CHANGE) );
      //———————————————————————————————————————————— EVENT HANDLERS
      private function onXMLComplete(event:Event):void
      // Create an XML Object from loaded data
      var data:XML = new XML(xmlLoader.data);
      // Now we can parse it
      var images:XMLList = data.image;
      for(var i:int = 0; i < images.length(); i++)
        // Get info from XML node
        var imageName:String = images[i].@name;
        var imagePath:String = images[i].@path;
      //  var textInfo:TextInfo = new TextInfo(); 
    //      textInfo.headerText.text = images[i].@headerText; <<<<THIS IS WHAT i HAVE TRIED, GET ERRORS SO COMMENTED OUT
    //    textInfo.bodyText.text = images[i].@bodyText;
    //    addChild(textinfo);
                  //textInfo.x=120;
        //textInfo.y=300;
        var sp:Sprite=new Sprite();    <<<<<<<< THIS IS SCRIPT JUST ADDED
        var tf:TextField=new TextField();
        tf.wordWrap=true;
        tf.width=200;
        var ldr:Loader=new Loader();
        addChild(sp);
        sp.addChild(tf);
        sp.addChild(ldr);
        ldr.x=tf.width+10;
        // Load images using standard Loader
        var loader:Loader = new Loader();
        // Listen for complete so we can center the image
        loader.contentLoaderInfo.addEventListener(Event.COMPLETE,onImageComplete);
        loader.load(new URLRequest(imagePath));
        // Create a container for the loader (image)
        var holder:Sprite = new Sprite();
        holder.addChild(loader);
        // Same proceedure as before
        holder.buttonMode = true;
        holder.addEventListener( MouseEvent.CLICK, onMenuItemClick );
        // Add it to the menu
        circleMenu.addChild(holder);
      private function onImageComplete(event:Event):void
      var img:Loader = event.currentTarget.loader;
      img.content["smoothing"] = true;
      img.x = -(img.width/2);
      img.y = -(img.height/2);
      private function onMouseWheel( event:MouseEvent ):void
      event.delta < 0 ? circleMenu.next() : circleMenu.prev();
      private function onMenuItemClick( event:MouseEvent ):void
      circleMenu.scrollToItem( event.currentTarget as DisplayObject );
      private function onSliderChange( event:Event ):void
      switch( event.currentTarget )
        case ui.spacingSlider:
        circleMenu.angleSpacing = event.currentTarget.value;
        break;
        case ui.radiusSlider:
        circleMenu.innerRadius = event.currentTarget.value;
        break;
        case ui.minAlphaSlider:
        circleMenu.minVisibleAlpha = event.currentTarget.value;
        break;
        case ui.minScaleSlider:
        circleMenu.minVisibleScale = event.currentTarget.value;
        break;
        case ui.scaleSlider:
        circleMenu.activeItemScale = event.currentTarget.value;
        break;
        case ui.itemsSlider:
        circleMenu.visibleItems = event.currentTarget.value;
        break;

  • Issues with iPhone 5 Battery

    My iPhone 5 was at 100% at 6am this morning. I have used it 3 times for checking email, once to check Facebook, sent 2 texts, listened to 5 mins of music and im now at 63%. This is minimal minimal use in my book. Ive also had a direct email from Phil Schiller himself telling me to be patient with it and get used to the battery life for my specific consumption. He wont be so flippant when iPhones are being returned in their 1000's. There is a problem that needs addressing by Apple. This is a genuine response from his [email protected] email.

    I am on neither. I am in the UK and I am on the O2 Network which has no LTE yet so that is not my problem. I think there is enough people on here in the US and the UK for Apple to investigate further. I refuse to put all my notifications and services on minimum as this shouldnt be the problem. I want to use my phone to its full ability. I have done a DFU reset and I am gong to see how far I get on today. At the moment I started at 100% at 6:45am and its is now 9am and I am on 95% battery. I have read some emails, been on Facebook twice and watch a 2 minute video. This phone just drains when its sat there. Its really poor form from Apple. Its saying ive used my phone for 39 minutes and that is so not the case.

  • Gui code design question ...

    Hi
    I need some designtip. Im doing a gui with tabs. Due to lots of lines of code when setting up each tab, the gui class rows is now heading towards infinity. Additionally the actionperformed method from all the buttons, jtexts and textareas on the tabs ... is also growing towards infinity.
    Simply put: I need design tips from the javamasters. Im quite bad at these kinds of design issues.
    A subquestion is also if there is any tutorials/books/howtos on how to come up with excellent designs, making the coding sweet.
    Thanks in advance !!!

    Hello,
    the topic of this thread is basically Gui code design. So, first of all, i recommend to understand the MVC-pattern, as it is the first step to get an understanding of reusable gui code. The Observer-pattern is no substitute for the MVC-pattern, but the MVC-pattern implies the Observer-pattern. Any MVC related topic will lead you in a second step to the Observer-pattern (see also The Core Java Technologies Tech Tip of January 13, 2006: http://java.sun.com/developer/JDCTechTips/2006/tt0113.html).
    Here are three classes (compiled with Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_10-b03)), which demonstrate the Observer-pattern in a very simplified way due to the shortness of code:
    The SubjectPanel which notifies the registered ObserverPanel:
    import java.awt.BorderLayout;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.JPanel;
    import javax.swing.JTextField;
    import javax.swing.event.ChangeEvent;
    import javax.swing.event.ChangeListener;
    public class SubjectPanel extends JPanel {
      private JTextField textfield = new JTextField("<Type some text>");
      private ChangeListener listener;
      public SubjectPanel(ChangeListener l) {
        listener = l;
        setLayout(new BorderLayout());
        add(textfield, BorderLayout.CENTER);
        textfield.setSelectionStart(0);
        textfield.setSelectionEnd(textfield.getText().length());
        textfield.addActionListener(new ActionListener() {
          public void actionPerformed(ActionEvent evt) {
            // notify the listener about the changed text
            listener.stateChanged(new ChangeEvent(textfield));
    }The ObserverPanel which wants to be notified when a change in SubjectPanel occures:
    import java.awt.BorderLayout;
    import javax.swing.BorderFactory;
    import javax.swing.JLabel;
    import javax.swing.JPanel;
    import javax.swing.JTextField;
    import javax.swing.event.ChangeEvent;
    import javax.swing.event.ChangeListener;
    public class ObserverPanel extends JPanel implements ChangeListener {
      private JLabel label = new JLabel();
      public ObserverPanel() {
        label.setBorder(BorderFactory.createEtchedBorder());
        setLayout(new BorderLayout());
        add(label, BorderLayout.CENTER);
      // Implementation of ChangeListener. This method is called by SubjectPanel
      // if the text has changed.
      public void stateChanged(ChangeEvent e) {
        label.setText(((JTextField)e.getSource()).getText());
    }The main class which contains SubjectPanel and ObserverPanel (Note, that this class doesn't know anything about the communication between the embedded panels):
    import java.awt.GridLayout;
    import javax.swing.JFrame;
    import javax.swing.WindowConstants;
    public class AppFrame extends JFrame {
      private SubjectPanel subjectPanel;
      private ObserverPanel observerPanel;
      public AppFrame() {
        setTitle("Observer");
        observerPanel = new ObserverPanel();
        // By passing the ObserverPanel to the SubjectPanel
        // a "one way communication line" is established
        subjectPanel = new SubjectPanel(observerPanel);
        getContentPane().setLayout(new GridLayout());
        getContentPane().add(subjectPanel);
        getContentPane().add(observerPanel);
      public static void main(String[] args) {
        AppFrame frame = new AppFrame();
        frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
        frame.pack();
        frame.setVisible(true);
    }Please, be aware of the fact, that due to the simplification this example lacks the model which is part of the MVC-pattern. The SubjectPanel represents the Controller and the ObserverPanel the View.

  • TextListeners and arrays

    Ok i'm working throught this online tutorial for java and almost done. I worked through a program that has u create a lotto game, u can use quick pick or enter ur own numbers. It runs the game until u get 6 out of 6 numbers. then u can play again. Now the winning numbers which the computer generates a random number 1-50 is a TextField array. and user numbers is assigned by TextField[ ] numbers = new TextField[6]. What i am having probs with is that i'm suppose to use the textlistener to detemine if the user enters the numbers that it is a number between 1-50 and not allow the game to start... this is all i can think of and it doesn't work
    numbers.addTextListener();
    this i get an cannot resolve symbol, but only happens when i try to add
    a listener to an array
    public void textValueChanged(TextEvent txt)
    this i'm just getting confused on how i'm using the argument
    any advice

    ok i got the text listener to work , it compiles it runs but anytime a textfield is set to null i get a long list of exception in the background about java.lang.NumberFormatException: for input string: " "
    here is all my code cause i don't know what u need.. sorry little messy
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.event.TextListener.*;
    public class LottoMadness extends java.applet.Applet implements ItemListener, ActionListener, TextListener, Runnable
    Thread playing;
    Panel row1 = new Panel();
    CheckboxGroup option = new CheckboxGroup();      
    Checkbox quickpick = new Checkbox("Quick Pick", option, false);     
    Checkbox personal = new Checkbox("Personal", option, false);
    Panel row2 = new Panel();
    Label numbersLabel = new Label("Your picks: ", Label.RIGHT);
    TextField[] numbers = new TextField[6];
    Label winnerLabel = new Label("Winners: ", Label.RIGHT);
    TextField[] winners = new TextField[7]; //array for 6 textfields to declare winning numbers, 1 for slowdown
    TextField slowDown = winners[6];
    Panel row3 = new Panel();
    Button stop = new Button("Stop");
    Button play = new Button("Play");
    Button reset = new Button("Reset");
    Panel row4 = new Panel();
    Label got3Label = new Label("3 of 6: ", Label.RIGHT);
    TextField got3 = new TextField();
    Label got4Label = new Label("4 of 6: ", Label.RIGHT);
    TextField got4 = new TextField();
    Label got5Label = new Label("5 of 6: ", Label.RIGHT);
    TextField got5 = new TextField(); //creates text field next to 5 of 6
    Label got6Label = new Label("6 of 6: ", Label.RIGHT);
    TextField got6 = new TextField(); //creates text field next to 6 of 6
    Label drawingsLabel = new Label("Drawings: ", Label.RIGHT);
    TextField drawings = new TextField(); //creates text field next to drawings
    Label yearsLabel = new Label("Years: ", Label.RIGHT);
    TextField years = new TextField(); //creates text field next to years
    public void init()
    setBackground(Color.lightGray);
    GridLayout appletLayout = new GridLayout(5, 1, 10, 10);
    setLayout(appletLayout);
    //add Listeners
    quickpick.addItemListener(this);
    personal.addItemListener(this);
    stop.addActionListener(this);
    play.addActionListener(this);
    reset.addActionListener(this);
    FlowLayout layout1 = new FlowLayout(FlowLayout.CENTER, 10, 10);
    row1.setLayout(layout1); //associates layout1 with Panel row1
    row1.add(quickpick); //adds quickpick to row1
    row1.add(personal); //adds personal to row1
    add(row1); //adds row1 to applet
    GridLayout layout2 = new GridLayout(2, 7, 10, 10);
    row2.setLayout(layout2);
    row2.add(numbersLabel);
    for(int i = 0; i < 6; i++)
    numbers[i] = new TextField();
    row2.add(numbers);           
    for(int i = 0; i < 6; i++)
    numbers[i].addTextListener(this);
    row2.add(winnerLabel); //adds winnerLabel to row2
    for(int i = 0; i < 6; i++)
    winners[i] = new TextField(); //sets up new TextField object
    winners[i].setEditable(false); //does not allow user to edit this text box
    row2.add(winners[i]); //adds each of the text boxes next to winners
    add(row2); //adds row2 to applet
    FlowLayout layout3 = new FlowLayout(FlowLayout.CENTER, 10, 10);
    row3.setLayout(layout3); //associates layout3 with Panel row3
    stop.setEnabled(false);
    row3.add(stop); //adds stop button to row3
    row3.add(play); //adds play button to row3
    row3.add(reset); //adds reset button to row3
    add(row3); //adds row3 to applet
    GridLayout layout4 = new GridLayout(2, 2, 20, 10);
    row4.setLayout(layout4); //associates layout4 with Panel row4
    row4.add(got3Label); //add got3Label to row4
    got3.setEditable(false); //don't allow user to edit it
    row4.add(got3); //add textfield got3 to row4
    row4.add(got4Label); //ect same as above
    got4.setEditable(false);
    row4.add(got4);
    row4.add(got5Label);
    got5.setEditable(false);
    row4.add(got5);
    row4.add(got6Label);
    got6.setEditable(false);
    row4.add(got6);
    row4.add(drawingsLabel);
    drawings.setEditable(false);
    row4.add(drawings);
    row4.add(yearsLabel);
    years.setEditable(false);
    row4.add(years);
    add(row4); //add row4 to applet
    public void actionPerformed(ActionEvent event) //if an action occurs from a button event info sent here
    String command = event.getActionCommand(); //id's the component responsible for event
    if(command == "Reset") //if component is Reset jump to clearAllFields() method
    clearAllFields();
    if(command == "Play") //if is Play
    playing = new Thread(this); //create new thread object
    playing.start(); //start game
    play.setEnabled(false); //since game started play button not needed
    stop.setEnabled(true); //since game started stop button should be available
    reset.setEnabled(false); //since game running reset not needed
    quickpick.setEnabled(false); //since game running quickpick or personal should not be able to be selected
    personal.setEnabled(false);
    if(command == "Stop") //if stop
    playing.stop(); //stop game
    stop.setEnabled(false);
    play.setEnabled(true);
    reset.setEnabled(true);
    quickpick.setEnabled(true);
    personal.setEnabled(true);
    public void itemStateChanged(ItemEvent event)      
    String command = (String) event.getItem(); //determines which item is picked
    if(command == "Quick Pick")
    for(int i = 0; i < 6; i++)
    int pick; //variable to hold the random number picked
    do
    pick = (int)Math.floor(Math.random() * 50 + 1);                
    while(numberGone(pick, numbers, i)); //create random number until this is no longer true from numberGone method
    numbers[i].setText("" + pick); //sets the number text field to random numbers picked
    else //if quick pick is not selected set all number text fields to null so user can enter the numbers
    for(int i = 0; i < 6; i++)
    numbers[i].setText(null);
    public void textValueChanged(TextEvent txt)
    Object source = txt.getSource();
    for(int i = 0; i < 6; i++)
    if(source == numbers[i])
    int newNumber = Integer.parseInt(numbers[i].getText());
    if(newNumber < 1 || newNumber > 50)
    numbers[i].setText(null);
    play.setEnabled(false);
    void clearAllFields()
    for(int i = 0; i < 6; i++)
    numbers[i].setText(null);
    winners[i].setText(null);
    got3.setText(null);
    got4.setText(null);
    got5.setText(null);
    got6.setText(null);
    drawings.setText(null);
    years.setText(null);
    void addOneToField(TextField field)
    int num = Integer.parseInt("0" + field.getText()); //get current number from field. 0 if nothing is there
    num++; //adds one to number
    field.setText("" + num); //displayes new number in field
    boolean numberGone(int num, TextField[] pastNums, int count)
    for(int i = 0; i < count; i++)           
    if(Integer.parseInt(pastNums[i].getText()) == num)
         return true;
         return false;
    boolean matchedOne(TextField win, TextField[] allPicks)
    for(int i = 0; i < 6; i++)
    String winText = win.getText(); //gets number computer picks
    if(winText.equals(allPicks[i].getText())) //sees if that number is equal to any numbers that user(or quick pick) picked
    return true; //if computer number matches any of user numbers return true
    return false; //if none were the same return false
    public void run()
    while(true)
    addOneToField(drawings); //add one to drawings field
    int draw = Integer.parseInt(drawings.getText()); //gets the number in the drawing field
    float numYears = (float)draw/104; //divides that number by 104, to assume 104 lotto drawings are played in one year
    years.setText("" + numYears); //sets numYears to the answer to display number of years playing lotto
    int matches = 0; //variable for number of matches made
    for(int i = 0; i < 7; i++)
    if(winners[i] == slowDown) //is new textField is equal to winner[6] (right after all numbers are picked for this round)
    try{Thread.sleep(500);} catch(InterruptedException e){} //pause
    break; //break from loop since winner[6] has no real values given to it
    int ball; //variable which is goin to hold the numbers the computer generates
    do
    ball = (int)Math.floor(Math.random() * 50 + 1); //creates random number 1 - 50
    while(numberGone(ball, winners, i)); //make sure random number is not the same as any other ones for this drawing
    winners[i].setText("" + ball); //set random number to winners[i] textfield
    if(matchedOne(winners[i], numbers)) //if there was a match
    matches++; //add one to matches
    switch(matches)
    case 3:
    addOneToField(got3); //if 3 were matched add 1 to got3 field
    break;
    case 4:
    addOneToField(got4); //if 4 were matched add 1 to got4 field
    break;
    case 5:
    addOneToField(got5); //if 5 were matched add 1 to got5 field
    break;
    case 6:
    addOneToField(got6); //if 6 were matched add 1 to got6 field
    stop.setEnabled(false);           
    play.setEnabled(true); //allow user to press play button
    playing.stop(); //stop applet

  • Flash for a second

    Hello people,
    Am trying to get a JLable to flash red for 1 second when the text changes. But am finding it very hard to figure out how to do it.
    Here is an example of a JLabel that listens for a change and tries to flash red for 1 second, but its not working.
    import java.beans.PropertyChangeListener;
    import java.awt.*;
    import java.awt.event.*;
    public class TextListenerTester extends Frame implements ActionListener, PropertyChangeListener  { 
      TextField t;
      Label l;
        public TextListenerTester ( String s )   { 
           super ( s ) ;
           setLayout ( new FlowLayout() ) ;
           t = new TextField (  ) ;
           l = new Label("hello");
           t.setSize ( 100,100 ) ;
           t.setLocation ( 50,50 ) ;
           add ( t ) ;  
           add ( l ) ;
           t.addActionListener ( this ) ;
           l.addPropertyChangeListener(this);
        public void actionPerformed ( ActionEvent e )   { 
           l.setText(t.getText() ) ;
         public void propertyChange(java.beans.PropertyChangeEvent evt){
             //l.setBackground(Color.red);  // here to flash for 1 second
             //repaint();
             System.out.println("I have changed");
        public static void main ( String [  ]  args )   { 
           TextListenerTester textListenerTester = new TextListenerTester ( "Text Listener Tester" ) ;
           textListenerTester.setSize ( 400,400 ) ;
           textListenerTester.setVisible ( true ) ;
    }Please help me out guys.
    Thanks

    How did you get it to work? Let's see your code. I had to try myself, and this is what I came up with. I created a subclass of JLabel and called a Thread.sleep method in a separate SwingWorker thread:
    import java.awt.*;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.*;
    public class FlashingLabel extends JFrame
        private MyLabel fooLabel;
        private String[] fooLabelTexts = {"Foo Label 1", "Foo Label 2",
                "Foo Label 3", "What the heck?!?"};
        private MySwingWorker mySwingWorker;
        public FlashingLabel()
            super("My Swing App");
            setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            getContentPane().add(myPanel());
            pack();
        private JPanel myPanel()
            JPanel fooPanel = new JPanel();
            GridLayout myGridLO = new GridLayout(0, 1);
            myGridLO.setHgap(5);
            myGridLO.setVgap(5);
            fooPanel.setLayout(myGridLO);
            fooPanel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
            JButton button = new JButton("Button");
            fooPanel.add(button);
            button.addActionListener(new ActionListener()
                public void actionPerformed(ActionEvent ae)
                    btnAction(ae);
            fooLabel = new MyLabel(fooLabelTexts[0]);
            fooPanel.add(fooLabel);
            return fooPanel;
        private void btnAction(ActionEvent ae)
            String fooStr = fooLabel.getText();
            int indx = -1;
            for (int i = 0; i < fooLabelTexts.length; i++)
                if (fooStr.equals(fooLabelTexts))
    indx = i;
    indx++;
    indx %= fooLabelTexts.length;
    fooLabel.setText(fooLabelTexts[indx]);
    private static void createAndShowGUI()
    FlashingLabel myBriefSwing = new FlashingLabel();
    myBriefSwing.setVisible(true);
    public static void main(String[] args)
    javax.swing.SwingUtilities.invokeLater(new Runnable()
    public void run()
    createAndShowGUI();
    class MyLabel extends JLabel
    private Color bkgdColor = null;
    private boolean opaque;
    public MyLabel()
    super();
    public MyLabel(String s)
    super(s);
    public void resetColor()
    super.setOpaque(opaque);
    super.setBackground(bkgdColor);
    super.revalidate();
    @Override
    public void setText(String s)
    // set only once, first time called
    if (bkgdColor == null)
    bkgdColor = super.getBackground();
    opaque = super.isOpaque();
    super.setBackground(Color.RED);
    super.setOpaque(true);
    super.setText(s);
    super.revalidate();
    mySwingWorker = new MySwingWorker();
    mySwingWorker.execute();
    class MySwingWorker extends SwingWorker<Void, Void>
    @Override
    protected Void doInBackground() throws Exception
    Thread.sleep(1000);
    return null;
    @Override
    public void done()
    SwingUtilities.invokeLater(new Runnable()
    public void run()
    fooLabel.resetColor();
    Message was edited by:
    petes1234

  • Want to make a paint bucket and open feature

    I am making this drawing application that so far contains a pencil tool, eraser, text tool, clear tool, and even save image feature. There are a few more features that I would like to add, including a paint bucket tool and a open image feature, but I am not sure exactly how to code them. Here is my code for the whole program:
    package
    import PNGEncoder;
    import flash.display.MovieClip;
    import flash.display.Shape;
    import flash.display.DisplayObject;
    import flash.text.TextField;
    import flash.text.TextFormat;
    import flash.text.TextFieldType;
    import flash.text.TextFieldAutoSize;
    import flash.display.BitmapData;
    import flash.geom.ColorTransform;
    import flash.events.MouseEvent;
    import flash.events.Event;
    import flash.utils.ByteArray;
    import flash.net.FileReference;
    public class Main extends MovieClip
    /* Variables */
    /* Pencil Tool shape, everything drawed with this tool and eraser is stored inside board.pencilDraw */
    var pencilDraw:Shape = new Shape();
    /* Text format */
    var textformat:TextFormat = new TextFormat();
    /* Colors */
    var colorsBmd:BitmapData;
    var pixelValue:uint;
    var activeColor:uint = 0x000000;
    /* Save dialog instance */
    var saveDialog:SaveDialog;
    /* Active var, to check wich tool is active */
    var active:String;
    /* Shape size color */
    var ct:ColorTransform = new ColorTransform();
    public function Main():void
    textformat.font = "Arial";
    textformat.bold = true;
    textformat.size = 24;
    convertToBMD();
    addListeners();
    /* Hide tools highlights */
    pencil.visible = false;
    hideTools(eraser, txt);
    /* Pencil Tool */
    private function PencilTool(e:MouseEvent):void
    /* Quit active tool */
    quitActiveTool();
    /* Set to Active */
    active = "Pencil";
    /* Listeners */
    board.addEventListener(MouseEvent.MOUSE_DOWN, startPencilTool);
    board.addEventListener(MouseEvent.MOUSE_UP, stopPencilTool);
    /* Highlight */
    highlightTool(pencil);
    hideTools(eraser, txt);
    ct.color = activeColor;
    shapeSize.transform.colorTransform = ct;
    private function startPencilTool(e:MouseEvent):void
    pencilDraw = new Shape();
    board.addChild(pencilDraw);
    pencilDraw.graphics.moveTo(mouseX, mouseY);
    pencilDraw.graphics.lineStyle(shapeSize.width, activeColor);
    board.addEventListener(MouseEvent.MOUSE_MOVE, drawPencilTool);
    private function drawPencilTool(e:MouseEvent):void
    pencilDraw.graphics.lineTo(mouseX, mouseY);
    private function stopPencilTool(e:MouseEvent):void
    board.removeEventListener(MouseEvent.MOUSE_MOVE, drawPencilTool);
    /* Eraser Tool */
    private function EraserTool(e:MouseEvent):void
    /* Quit active tool */
    quitActiveTool();
    /* Set to Active */
    active = "Eraser";
    /* Listeners */
    board.addEventListener(MouseEvent.MOUSE_DOWN, startEraserTool);
    board.addEventListener(MouseEvent.MOUSE_UP, stopEraserTool);
    /* Highlight */
    highlightTool(eraser);
    hideTools(pencil, txt);
    ct.color = 0x000000;
    shapeSize.transform.colorTransform = ct;
    private function startEraserTool(e:MouseEvent):void
    pencilDraw = new Shape();
    board.addChild(pencilDraw);
    pencilDraw.graphics.moveTo(mouseX, mouseY);
    pencilDraw.graphics.lineStyle(shapeSize.width, 0xFFFFFF);
    board.addEventListener(MouseEvent.MOUSE_MOVE, drawEraserTool);
    private function drawEraserTool(e:MouseEvent):void
    pencilDraw.graphics.lineTo(mouseX, mouseY);
    function stopEraserTool(e:MouseEvent):void
    board.removeEventListener(MouseEvent.MOUSE_MOVE, drawEraserTool);
    /* Text Tool */
    private function TextTool(e:MouseEvent):void
    /* Quit active tool */
    quitActiveTool();
    /* Set to Active */
    active = "Text";
    /* Listener */
    board.addEventListener(MouseEvent.MOUSE_UP, writeText);
    /* Highlight */
    highlightTool(txt);
    hideTools(pencil, eraser);
    private function writeText(e:MouseEvent):void
    var textfield = new TextField();
    textfield.type = TextFieldType.INPUT;
    textfield.autoSize = TextFieldAutoSize.LEFT;
    textfield.selectable = false;
    textfield.defaultTextFormat = textformat;
    textfield.textColor = activeColor;
    textfield.x = mouseX;
    textfield.y = mouseY;
    stage.focus = textfield;
    board.addChild(textfield);
    /* Save */
    private function export():void
    var bmd:BitmapData = new BitmapData(600, 290);
    bmd.draw(board);
    var ba:ByteArray = PNGEncoder.encode(bmd);
    var file:FileReference = new FileReference();
    file.addEventListener(Event.COMPLETE, saveSuccessful);
    file.save(ba, "ballin.png");
    private function saveSuccessful(e:Event):void
    saveDialog = new SaveDialog();
    addChild(saveDialog);
    saveDialog.closeBtn.addEventListener(MouseEvent.MOUSE_UP, closeSaveDialog);
    private function closeSaveDialog(e:MouseEvent):void
    removeChild(saveDialog);
    private function save(e:MouseEvent):void
    export();
    /* Clear Tool */
    private function clearBoard(e:MouseEvent):void
    /* Create a blank rectangle on top of everything but board */
    var blank:Shape = new Shape();
    blank.graphics.beginFill(0xFFFFFF);
    blank.graphics.drawRect(0, 0, board.width, board.height);
    blank.graphics.endFill();
    board.addChild(blank);
    /* Default colors function */
    private function convertToBMD():void
    colorsBmd = new BitmapData(colors.width,colors.height);
    colorsBmd.draw(colors);
    private function chooseColor(e:MouseEvent):void
    pixelValue = colorsBmd.getPixel(colors.mouseX,colors.mouseY);
    activeColor = pixelValue;//uint can be RGB!
    ct.color = activeColor;
    shapeSize.transform.colorTransform = ct;
    /* Quit active function */
    private function quitActiveTool():void
    switch (active)
    case "Pencil" :
    board.removeEventListener(MouseEvent.MOUSE_DOWN, startPencilTool);
    board.removeEventListener(MouseEvent.MOUSE_UP, stopPencilTool);
    case "Eraser" :
    board.removeEventListener(MouseEvent.MOUSE_DOWN, startEraserTool);
    board.removeEventListener(MouseEvent.MOUSE_UP, stopEraserTool);
    case "Text" :
    board.removeEventListener(MouseEvent.MOUSE_UP, writeText);
    default :
    /* Highlight active Tool */
    private function highlightTool(tool:DisplayObject):void
    tool.visible=true;
    private function hideTools(tool1:DisplayObject, tool2:DisplayObject):void
    tool1.visible=false;
    tool2.visible=false;
    /* Change shape size */
    private function changeShapeSize(e:MouseEvent):void
    if (shapeSize.width >= 50)
    shapeSize.width = 1;
    shapeSize.height = 1;
    /* TextFormat */
    textformat.size = 16;
    else
    shapeSize.width += 5;
    shapeSize.height=shapeSize.width;
    /* TextFormat */
    textformat.size+=5;
    private function addListeners():void
    pencilTool.addEventListener(MouseEvent.MOUSE_UP, PencilTool);
    eraserTool.addEventListener(MouseEvent.MOUSE_UP, EraserTool);
    textTool.addEventListener(MouseEvent.MOUSE_UP, TextTool);
    saveButton.addEventListener(MouseEvent.MOUSE_UP, save);
    clearTool.addEventListener(MouseEvent.MOUSE_UP, clearBoard);
    colors.addEventListener(MouseEvent.MOUSE_UP, chooseColor);
    sizePanel.addEventListener(MouseEvent.MOUSE_UP, changeShapeSize);
    shapeSize.addEventListener(MouseEvent.MOUSE_UP, changeShapeSize);
    Any ideas on how to code these features?

    any1?

  • KIN Two M Review

    Ok folks! I got my new KIN today. I've only had it a few hours and wanted to give my impression(s). Like most everyone else I've read a lot of bad things about the KIN but I wanted (needed) to see for myself. On paper it just looked too good. 
    My old phone was the Voyager. Look it up. It's a lot like the enV Touch. Before that I had a Samsung Omnia and before that an enV (1). And before that... I don't even remember.
    So, as a reference to my opinion, for anyone who has any experience with any of the phones I listed:
    1) the Voyager was a good phone. Kind of big. Touch screen was not the best. Nowhere near iPod/iPhone quality. But overall I was satisfied with the phone.
    2) Samsung Omnia. {word filter avoidance}
    ! Worst phone ever produced! This phone was so bad I reactivated my old phone after 7 days of really trying to learn it and like it. Forget about it or anything else with Windows Phone on it. 
    3) enV was good. It was pretty new and different then. I liked it a lot.
    Ok. So, now to the KIN: first impression: relieved! this is a really cool phone. You have to see it not as a smart phone but as a feature phone. As a smart phone it will strike you as limited. As a feature phone it is the coolest phone I've ever seen. It does everything my old phone does and does it easily. So, my recommendation is if you're wavering, order it.
    Now to some specifics:
    Touch screen: if you've ever used a Touch iPod or iPhone or an Android, it's just like that. It is the first thing that hit me and it's worth the price of admission alone. After using resistive capacitive phones this thing will change the way you view touch screens.
    Contacts list: get over it! Verizon screwed up on this (big time!!) but forget about it! Sit down with a cold one and enter in your contacts. PITA but worth having this phone for. 
    Messaging: Hmmm... it's more like instant messaging than text messaging. Each person is like a long running conversation. When you text, you are continuing a conversation. So you see all the texts you exchanged with that person. Of course, just like Instant Messaging, when you delete you delete the whole conversation. Is that a big deal? Not for me. I liked being able to save old text messages but, come on! It's not that big of a deal. I'll adapt. And no, you can't forward. I've forwarded maybe 10 messages in my life. So, again, not a great loss for me. And you can't get the little picture emoticons that normal feature phones do. But it's kind of like texting someone on AT&T from a Verizon phone.
    IN EXCHANGE: it has a really (REALLY) neat feature that pops up a little balloon in whatever you're doing with any incoming texts. You can go to texting or ignore it. I LOVE it. It sounds less cool than it is. I would easily trade any lost feature for it. And it has a text emoticon button. This is too cool. You're texting, you hit the button, you get a little menu of emoticons, hit one and go back to texting. 
    Internet: This is it! Works awesome! Not everything but I'm amazed at how much DOES work. You can surf the internet on your cellphone WITHOUT a data plan! Forget about all the things it can't do. It can do plenty. Don't forget, this isn't a smart phone. It's (just) a feature phone. And seen from that prospective, well, show me another feature phone that can surf the net for free!
    I synced a bunch of albums to the Zune player. It works great and picks up the cover art to boot!  BTW the radio works fantastic! And a 3.5mm headphone jack. Too cool!
    I don't plug products very often but I've read a lot of bad things about this phone. While they may all be true to a degree, they are, imo, WAY over blown. This is a cool phone and I'm keeping it!

    Just receieved my kin twom yesterday in the mail. Activation was a little hairy for some reason as I had to call in to customer support and have them add in my phone manually as opposed to *228 option 1..other than that the phone is rather nice. I used to have a droid eris, lg dare and an octane while the wife has an env3 and an ipod touch.
    I'd have to put the kin twom somewhere inbetween the droid eris and the octane/env3 review wise. The touch screen is rather nice, clear to see and use with very little lag if any. Setting up the phone was rather easy as well although I DID have to enter contacts in manually (however with the keyboard its not that hard at all). Weight wise its a little heavier, I think, than the ipod touch but not painfully heavy by any means. Audio quality in both music and simple talk is rather impressive...in my opinion much better than the Octane/env3. Adding ringtones was definately a pain though as I had to 1. move the ringtones I had stored on my computer to the memory card of my wife's env3 2. send those ringtones from my wifes env3 to my phone 3. save the ringtones from the mms message I receieved.Contrary to a previous post I read the ringtones are saved individually by the name of the sound that was sent..NOT unnamed. Ringtones CAN be assigned to individual contacts as well as you can assign a custom sound for voicemail, messages calendar alerts and alarms.
    In order to store any other music (mp3 albums and the like) or pictures, videos and podcasts you DO need to use the Zune software however I don't see that as a real deterrent especially if you're used to an ipod. Space on the phone is limited (limited as in I can only put on about 110 or so albums of my mp3 collection). When you first receieve your phone you have approximately 6.5gig free of memory (as opposed to 8gig).
    Web browsing definately works and while it may not be super speedy it is definately useable for simple forum reading, facebook updates, etc.
    All in all I'd give it a 4 out of 5 as a feature phone and a 2.75 as a smartphone. I'd HIGHLY recommend this phone for anyone that wants what I call an intelligent (as opposed to smart) phone...aka ability to text, listen to music, and mild web browsing with NO data plan required (provided you have wifi). Make sure you DO download/look at the manual posted in this thread as the phone itself does not come with an actual manual(just a quick guide that doesn't explain much).
    Some things I found out that may not be posted in the manual: When typing anything and you want to permanetly use the symbols/green button functions press the green button twice and that will make anything you type use the symbols (as opposed to pressing it once for only one symbol). If you have issues with charging the phone try charging it from a computer as opposed to the outlet that is supplied, while it may take longer I've found it to be a better charger. Any other questions please feel free to ask and I'll mess with the phone and get you an answer .
    Almost forgot...you can block data without having to call anyone by using the 'my verizon' feature on the verizonwireless website. I don't remember exactly where it is listed but its somewhere under 'change features' I believe. You do NOT need to disable roaming data nor do you need to enable airplane mode (enabling airplane mode can in essence DISable your actual phone calling and receieving capabilites). Link to Zune software: http://www.zune.net/en-US/products/software/download/default.htm

  • Hi, Im having trouble with my Iphones sounds, it wont let me listen to music, watch videos, notify me if i get a text, basically everything that makes a sound is no longer working. The volume level you get when you play music isnt there, HELP?!

    Hi, basically i have no sound at all on my Iphone, it doent notify me when i get a text, when someone rings, when i play music or watch videos, the volume slider that is usually present while watching videos or listening to music is no longer there at all, ive turned my phone on and off a couple of times now ive put headphones in and out to see if i had a sticky jack but still no luck Someone help??

    And to clarify, these are all iTunes movie and music downloads, so there should not be a compatability issue. And no, the iPod did not come damaged from Apple, it was a hand-me-down from a friend who busted the internal speaker. But it's never done anything like this before. It just had crappy sound. And yes, the timing of the movies and music having issues is the same as the speaker dying. And no, this has NOTHING To do with music videos. I don't have any on any of our devices.

  • How can I listen to a text using Siri whilst phone is locked?

    Hi I have just been playing with my new 4s and I would like to listen to a text through my headphones whilst biking. But it's annoying as Siri says I need to unlock my phone first. Is there settings to overwrite this? Also why can't I listen to an old message from someone? Even if it's the last one and if I voice the contact.
    Thanks

    My suggestion is to first run the Acrobat repair tool: http://labs.adobe.com/downloads/acrobatcleaner.html
    If that doesn't work then you can try to use the CC Cleaner tool, then re-install the entire suite
    http://helpx.adobe.com/creative-suite/kb/cs5-cleaner-tool-installation-problems.html

  • JTextField and PropertyChangeListener - listening to text changes

    I have added a PropertyChangeListener to a JTextField. The only changes that fire the event are the ancestor and Frame.active properties. Why doesn't changing the text property of the JTextField fire the Listener?

    For that there is a DocumentListener class.

Maybe you are looking for