Having an issue with event handling - sql database  & java gui

HI all, have posted this on another forum but I think this is the correct one to post on. I am trying to construct this hybrid of java and mysql. the data comes from a mysql database and I want it to display in the gui. this I have achieved thus far. However I have buttons that sort by surname, first name, ID tag etc....I need event handlers for these buttons but am quite unsure as to how to do it. any help would be much appreciated. Thanks in advance.
/* Student Contact Database GUI
* Phillip Wells
import java.awt.BorderLayout;     
// imports java class. All import class statements tell the compiler to use a class that is defined in the Java API.
// Borderlayout is a layout manager that assists GUI layout.
import javax.swing.*;               // imports java class. Swing enables the use of a GUI.
import javax.swing.JOptionPane;     // imports java class. JOptionPane displays messages in a dialog box as opposed to a console window.
import javax.swing.JPanel;          // imports java class. A component of a GUI.
import javax.swing.JFrame;          // imports java class. A component of a GUI.
import javax.swing.JButton;          // imports java class. A component of a GUI.
import javax.swing.JScrollPane;     // imports java class. A component of a GUI.
import javax.swing.JTable;          // imports java class. A component of a GUI.
import java.awt.*;               // imports java class. Similar to Swing but with different components and functions.
import java.awt.event.*;          // imports java class. Deals with events.
import java.awt.event.ActionEvent;     // imports java class. Deals with events.
import java.awt.event.ActionListener;     // imports java class. Deals with events.
import java.sql.*;               // imports java class. Provides API for accessing and processing data stored in a data source.
import java.util.*;               // imports java class. Contains miscellaneous utility classes such as strings.
public class studentContact extends JFrame {     // public class declaration. The �public� statement enables class availability to other java elements. 
private JPanel jContentPane; // initialises content pane
private JButton snam, id, fname, exit; // initialises Jbuttons
String firstname = "firstname"; //initialises String firstname
String secondname = "secondname"; //initialises String
public studentContact() {
Vector columnNames = new Vector();      // creates new vector object. Vectors are arrays that are expandable.
Vector data = new Vector();
initialize();
try {
// Connect to the Database
String driver = "com.mysql.jdbc.Driver"; // connect to JDBC driver
String url = "jdbc:mysql://localhost/Studentprofiles"; //location of Database
String userid = "root"; //user logon information for MySQL server
String password = "";     //logon password for above
Class.forName(driver); //reference to JDBC connector
Connection connection = DriverManager.getConnection(url, userid,
password);     // initiates connection
// Read data from a table
String sql = "Select * from studentprofile order by "+ firstname;
//SQL query sent to database, orders results by firstname.
Statement stmt = connection.createStatement
(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE);
//statement to create connection.
//Scroll sensitive allows movement forth and back through results.
//Concur updatable allows updating of database.
ResultSet rs = stmt.executeQuery(sql); // executes SQL query stated above and sets the results in a table
ResultSetMetaData md = rs.getMetaData();     // used to get the properties of the columns in a ResultSet object.
int columns = md.getColumnCount(); //
for (int i = 1; i <= columns; i++) {
columnNames.addElement(md.getColumnName(i));     // Get column names
while (rs.next()) {
Vector row = new Vector(columns);          // vectors data from table
for (int i = 1; i <= columns; i++) {     
row.addElement(rs.getObject(i));     // Get row data
data.addElement(row);     // adds row data
rs.close();     
stmt.close();
} catch (Exception e) {     // catches exceptions
System.out.println(e);     // prints exception message
JTable table = new JTable(data, columnNames) {     //constructs JTable
public Class getColumnClass(int column) {     
for (int row = 0; row < getRowCount(); row++) {
Object o = getValueAt(row, column);
if (o != null) {
return o.getClass();
return Object.class;
JScrollPane scrollPane = new JScrollPane( table ); // constructs scrollpane 'table'
getContentPane().add(new JScrollPane(table), BorderLayout.SOUTH); //adds table to a scrollpane
private void initialize() {
this.setContentPane(getJContentPane());
this.setTitle("Student Contact Database");     // sets title of table
ButtonListener b1 = new ButtonListener();     // constructs button listener
snam = new JButton ("Sort by surname");     // constructs Jbutton
snam.addActionListener(b1);     // adds action listener
jContentPane.add(snam);          //adds button to pane
id = new JButton ("Sort by ID");     // constructs Jbutton
id.addActionListener(b1);     // adds action listener
jContentPane.add(id);          //adds button to pane
fname = new JButton ("Sort by first name");     // constructs Jbutton
fname.addActionListener(b1);     // adds action listener
jContentPane.add(fname);          //adds button to pane
exit = new JButton ("Exit");     // constructs Jbutton
exit.addActionListener(b1);     // adds action listener
jContentPane.add(exit);          //adds button to pane
private JPanel getJContentPane() {
if (jContentPane == null) {
jContentPane = new JPanel();          // constructs new panel
jContentPane.setLayout(new FlowLayout());     // sets new layout manager
return jContentPane;     // returns Jcontentpane
private class ButtonListener implements ActionListener {     // create inner class button listener that uses action listener
public void actionPerformed (ActionEvent e)
if (e.getSource () == exit)     // adds listener to button exit.
System.exit(0);     // exits the GUI
if (e.getSource () == snam)
if (e.getSource () == id)
if (e.getSource () == fname)
public static void main(String[] args) {     // declaration of main method
studentContact frame = new studentContact();     // constructs new frame
frame.setDefaultCloseOperation(EXIT_ON_CLOSE);     //exits frame on closing
frame.setSize(600, 300);          // set size of frame
frame.setVisible(true);     // displays frame
}

OK, so you've got this code here:
private class ButtonListener implements ActionListener {
  public void actionPerformed (ActionEvent e) {
    if (e.getSource () == exit) {
      System.exit(0); // exits the GUI
    if (e.getSource () == snam) {
    if (e.getSource () == id) {
}Perfect fine way to do this; although I think creating anonymous would be a bit cleaner:
snam.addActionListener(new actionListener() {
  public void actionPerformed(ActionEvent ae) {
});But I think that the real question you have is "what do I put for logic when the JButtons are hit?", right?
I would answer that you want to dynamically build your SQL statement changing your ordering based on the button.
So you'd have a method that builds the SQL based on what you pass in - so it takes one argument perhaps?
private static final int NAME = 1;
                         ID = 2;
/* ... some code ... */
snam.addActionListener(new actionListener() {
  public void actionPerformed(ActionEvent ae) {
    buildSQL(NAME);
/* ... some code ... */
private void buildSQL(int type) {
  if ( type == NAME ) {
/* ... build SQL by name ... */
  else if ( type == ID ) {
/* ... build SQL by id ... */
}That kind of thing.
Or you might choose to have several build methods with no parameter type; each building the SQL differently, and calling whichever one you need. I did not read your entire pgm, so I don't know how you'd want to organize it. You need to ask more specific questions at that point.
~Bill

Similar Messages

  • Having an issue with event handling - sql & java

    HI all am trying to construct this hybrid of java and mysql. the data comes from a mysql database and I want it to display in the gui. this I have achieved thus far. However I have buttons that sort by surname, first name, ID tag etc....I need event handlers for these buttons but am quite unsure as to how to do it. any help would be much appreciated. Thanks in advance.
    /* Student Contact Database GUI
    * Phillip Wells
    import java.awt.BorderLayout;     
    // imports java class. All import class statements tell the compiler to use a class that is defined in the Java API.
    // Borderlayout is a layout manager that assists GUI layout.
    import javax.swing.*;               // imports java class. Swing enables the use of a GUI.
    import javax.swing.JOptionPane;     // imports java class. JOptionPane displays messages in a dialog box as opposed to a console window.
    import javax.swing.JPanel;          // imports java class. A component of a GUI.
    import javax.swing.JFrame;          // imports java class. A component of a GUI.
    import javax.swing.JButton;          // imports java class. A component of a GUI.
    import javax.swing.JScrollPane;     // imports java class. A component of a GUI.
    import javax.swing.JTable;          // imports java class. A component of a GUI.
    import java.awt.*;               // imports java class. Similar to Swing but with different components and functions.
    import java.awt.event.*;          // imports java class. Deals with events.
    import java.awt.event.ActionEvent;     // imports java class. Deals with events.
    import java.awt.event.ActionListener;     // imports java class. Deals with events.
    import java.sql.*;               // imports java class. Provides API for accessing and processing data stored in a data source.
    import java.util.*;               // imports java class. Contains miscellaneous utility classes such as strings.
    public class studentContact extends JFrame {     // public class declaration. The �public� statement enables class availability to other java elements. 
        private JPanel jContentPane;    // initialises content pane
        private JButton snam, id, fname, exit;     // initialises Jbuttons
        String firstname = "firstname"; //initialises String firstname
         String secondname = "secondname"; //initialises String
        public studentContact() {
            Vector columnNames = new Vector();      // creates new vector object. Vectors are arrays that are expandable.
            Vector data = new Vector();
            initialize();
            try {
                // Connect to the Database
                String driver = "com.mysql.jdbc.Driver"; // connect to JDBC driver
                String url = "jdbc:mysql://localhost/Studentprofiles"; //location of Database
                String userid = "root"; //user logon information for MySQL server
                String password = "";     //logon password for above
                Class.forName(driver); //reference to JDBC connector
                Connection connection = DriverManager.getConnection(url, userid,
                        password);     // initiates connection
                // Read data from a table
                String sql = "Select * from studentprofile order by "+ firstname;
                //SQL query sent to database, orders results by firstname.
                Statement stmt = connection.createStatement
                (ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE);
                //statement to create connection.
                //Scroll sensitive allows movement forth and back through results.
                //Concur updatable allows updating of database.
                ResultSet rs = stmt.executeQuery(sql); // executes SQL query stated above and sets the results in a table
                ResultSetMetaData md = rs.getMetaData();     // used to get the properties of the columns in a ResultSet object.
                int columns = md.getColumnCount(); //
                for (int i = 1; i <= columns; i++) {
                    columnNames.addElement(md.getColumnName(i));     // Get column names
                while (rs.next()) {
                    Vector row = new Vector(columns);          // vectors data from table
                    for (int i = 1; i <= columns; i++) {     
                        row.addElement(rs.getObject(i));     // Get row data
                    data.addElement(row);     // adds row data
                rs.close();     
                stmt.close();
            } catch (Exception e) {     // catches exceptions
                System.out.println(e);     // prints exception message
            JTable table = new JTable(data, columnNames) {     //constructs JTable
                public Class getColumnClass(int column) {     
                    for (int row = 0; row < getRowCount(); row++) {
                        Object o = getValueAt(row, column);
                        if (o != null) {
                            return o.getClass();
                    return Object.class;
            JScrollPane scrollPane = new JScrollPane( table );          // constructs scrollpane 'table'
            getContentPane().add(new JScrollPane(table), BorderLayout.SOUTH);   //adds table to a scrollpane
        private void initialize() {
            this.setContentPane(getJContentPane());
            this.setTitle("Student Contact Database");     // sets title of table
            ButtonListener b1 = new ButtonListener();     // constructs button listener
            snam = new JButton ("Sort by surname");      // constructs Jbutton
            snam.addActionListener(b1);     // adds action listener
            jContentPane.add(snam);          //adds button to pane
            id = new JButton ("Sort by ID");      // constructs Jbutton
            id.addActionListener(b1);     // adds action listener
            jContentPane.add(id);          //adds button to pane
            fname = new JButton ("Sort by first name");      // constructs Jbutton
            fname.addActionListener(b1);     // adds action listener
            jContentPane.add(fname);          //adds button to pane
            exit = new JButton ("Exit");     // constructs Jbutton
            exit.addActionListener(b1);     // adds action listener
            jContentPane.add(exit);          //adds button to pane
        private JPanel getJContentPane() {
            if (jContentPane == null) {
                jContentPane = new JPanel();          // constructs new panel
                jContentPane.setLayout(new FlowLayout());     // sets new layout manager
            return jContentPane;     // returns Jcontentpane
        private class ButtonListener implements ActionListener {     // create inner class button listener that uses action listener
            public void actionPerformed (ActionEvent e)
                if (e.getSource () == exit)     // adds listener to button exit.
                   System.exit(0);     // exits the GUI
                if (e.getSource () == snam)
                if (e.getSource () == id)
                if (e.getSource () == fname)
        public static void main(String[] args) {     // declaration of main method
            studentContact frame = new studentContact();     // constructs new frame
            frame.setDefaultCloseOperation(EXIT_ON_CLOSE);     //exits frame on closing
            frame.setSize(600, 300);          // set size of frame
            frame.setVisible(true);     // displays frame
    }p.s. sorry about the untidy comments!

    OK, so you've got this code here:
    private class ButtonListener implements ActionListener {
      public void actionPerformed (ActionEvent e) {
        if (e.getSource () == exit) {
          System.exit(0); // exits the GUI
        if (e.getSource () == snam) {
        if (e.getSource () == id) {
    }Perfect fine way to do this; although I think creating anonymous would be a bit cleaner:
    snam.addActionListener(new actionListener() {
      public void actionPerformed(ActionEvent ae) {
    });But I think that the real question you have is "what do I put for logic when the JButtons are hit?", right?
    I would answer that you want to dynamically build your SQL statement changing your ordering based on the button.
    So you'd have a method that builds the SQL based on what you pass in - so it takes one argument perhaps?
    private static final int NAME = 1;
                             ID = 2;
    /* ... some code ... */
    snam.addActionListener(new actionListener() {
      public void actionPerformed(ActionEvent ae) {
        buildSQL(NAME);
    /* ... some code ... */
    private void buildSQL(int type) {
      if ( type == NAME ) {
    /* ... build SQL by name ... */
      else if ( type == ID ) {
    /* ... build SQL by id ... */
    }That kind of thing.
    Or you might choose to have several build methods with no parameter type; each building the SQL differently, and calling whichever one you need. I did not read your entire pgm, so I don't know how you'd want to organize it. You need to ask more specific questions at that point.
    ~Bill

  • A project which specifies SQL Server 2012 as the target platform may experience compatibility issues with Microsoft Azure SQL Database.

    Hello
    When I try to publis my asp.net application in azure, i have the next error:
    >C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\Web\Microsoft.Web.Publishing.targets(4253,5): Warning : A project which specifies SQL Server 2012 as the target platform may experience compatibility issues with Microsoft Azure SQL Database.
    >C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\Web\Microsoft.Web.Publishing.targets(4253,5): Warning : The project and target databases have different collation settings. Deployment errors might occur.

    Hello
    When I try to publis my asp.net application in azure, i have the next error:
    >C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\Web\Microsoft.Web.Publishing.targets(4253,5): Warning : A project which specifies SQL Server 2012 as the target platform may experience compatibility issues with Microsoft Azure SQL Database.
    >C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\Web\Microsoft.Web.Publishing.targets(4253,5): Warning : The project and target databases have different collation settings. Deployment errors might occur.
    Hello,
    This forum is to discuss vb.net issues, your issue is mainly regarding Azure SQL Database, I found that you have posted another thread in that forum
    https://social.msdn.microsoft.com/Forums/azure/en-US/f435921a-14d1-4441-8b2b-32ba3d937aea/a-project-which-specifies-sql-server-2012-as-the-target-platform-may-experience-compatibility-issues?forum=ssdsgetstarted#f435921a-14d1-4441-8b2b-32ba3d937aea.
    I would recommend you focus on that thread to get help.
    Regards,
    Carl
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • I am having multiple issues with syncing my iphone calendar and outlook There are often 1 hour time differences in the entries on the 2 devices and sometimes events that have been amended are not updated on iphone I mostly enter items on my laptop

    I am having multiple issues with syncing my iphone calendar and outlook calendar on my laptop
    I mostly enter the original items on my laptop
    There are often 1 hour time differences in the entries on the 2 devices and sometimes events that have been amended are not updated on iphone

    This sounds like an error in Time Zone support. The time zone needs to be the same in Outlook as well as the phone.

  • Hi, i am having an issue with a basic motion scroll effect.  I already watched and read every tutorial out there regarding this topic and even tried the adobe chat support, but the guy on the other end of the line disconnected me-, probably he didn't unde

    Hi, i am having an issue with a basic motion scroll effect.
    I already watched and read every tutorial out there regarding this topic and even tried the adobe chat support, but the guy on the other end of the line disconnected me…, probably he didn't understand what i wanted from him because english is not my native language, so a will try to be very, very clear about this one..
    please note, that i am new to muse, this is my first project ever.
    my idea is as following:
    when the customer comes to our companies site, he just sees our logo on a white Background. the logo consists of, say, four elements. when the customer scrolls down, the logo starts to disassamble: first the first part of the logo flies out the left side of the site, then the second part of the logo vanishes down, then the third part of the logo flies to the right, then the fourth part of the logo flies to the top and out of the customers view. given what i have seen, it is possible to do that….
    so…..
    now i have the four parts of my logo imported as png files into muse and assembled them in design view to build our companies logo. I select every one of the four parts and go into the scroll effects tab left beside the layers tab. first i enter the same values for every one of the four parts: initial motion: 0x and 0x again for the left and right motion; key position ( t-handle) : 0px; final motion: 0x and 0x again for the left and right value.
    now i hit "preview".: the logo is "pinned" at the correct position, i can scroll but the logo stays where it is. so far so good….
    now i select all the four elements again and go to the scroll effecs tab. at "final motion", i click the down arrows and enter 1x. I hit Preview…
    when i am scrolling down the WHOLE logo goes down…. so far so good.
    NOW i want the first part of the logo to go down, THEN the second part to go left, THEN the third part to go up, THEN the fourth part to go right.
    so i select ONLY the first part, go to the scroll motion tab, at "final motion" i click the left arrows, then i enter 1x.( the up-down value, i set to 0 again).. i hit Preview…
    the first part of the logo goes left as soon as i start scrolling, the other three parts still go down at the same time…
    NOW i want the second part of the logo to start moving, when the first part has left the scene, not at the same time as the first part.
    SO I SELECT THE SECOND PART AND DRAG ITS T-HANDLE (KEY POSITION) DOWN TO, LETS SAY, 200PX. SO IT STARTS MOVING ONLY AFTER THE CUSTOMER HAS REACHED THAT POINT, RIGHT?
    BUT WHEN I PREVIEW THAT ****, THE LOGO IS NOT TOGETHER ANYMORE, THE SECOND PART IS FLOATING ANYWHERE ELSE BUT WHERE IT SHOULD BE…..WTFF????
    short: when i move the t handle, the initial position of the object changes. thats what i said to the adobe employee, but he said, that thats the expected behavior….
    but if thats so, how can i have my four parts correctly together, so they form my logo, but with different t handles, so that they all start to move at different times??
    Pleeease help me, i am dying of frustration here…..:( that behavior cant be right, right?
    Thanks so much to everyone who actually reads this post and tries to help…….
    All the best,
    Niki Lapan

    Thank you so much for helping,
    But i really wonder how you did that. did you always switch between design view and preview view, then change the key position for 2px then switch back, to align the four letters? because i imagine that can get really frustrating, if you have a logo consisting of 58 parts instead of 4!:)
    Anyway thank you very much for your time and effort!!!!

  • Captivate 5.5 Question: We seem to be having an issue with the screen capture piece not recording "e

    Captivate 5.5 Question: We seem to be having an issue with the screen capture piece not recording "everything".
    We're running 5.5 as an administrator on Windows 7 and my co-worker is trying to capture a webinar (GoToMeeting) with Captivate and it is not recording anything in the GTM window, except the last slide. Anyone have this problem or know a fix? Not much is mentioned in the Adobe forums.

    Captivate simply doesn't 'hear' some screen events on certain applications and you just need to resort to doing manual captures at these points.
    I usually set up my manual capture button to be F2 so that I can hit it with my left hand while my right hand is on the mouse navigating through the task.

  • Migration from Serial polling to Serial queue with event handler

    Hi, I am trying to migrate from classical serial polling communications to serial queue with "event handler" for the buttons pressed by the user. I have placed four while loops, one for the event handler, a second one for serial reading, a third one for serial writing (depending on what button was pressed) and the last one for processing what was read from the serial reading while loop, via a queue.
    My attached device reads the signals from 8 sensor ( 4 temperature and another 4 temperature plus humidity in the same sensor ) and send them via serial to Lavbiew.
    First of all, only once just after running the LV program, I must turn on my attached device with an ON command plus a carriage return after that the device will respond with the number of sensors plugged to it, disabling the corresponding buttons in the front panel. Then labview must wait until I pressed Acquire Button (event handler) and send a CF command plus what sensors to acquire plus a carriage return, then the device will respond continuously to labview with the sensor readings until I press the stop button (event handler), there is also another button to exit the program, also with event handler.
    I am having problems using the event handler and the queues because I am new using these structures, I have looked at  the LV examples but there is nothing concrete on using serial with event handler and queue.
    Take a look at my VI and you will soon notice what kind of problems I am having, any suggestions will welcome.
    Thank's in advance.
    Regards.
    Attachments:
    serial queue.zip ‏76 KB

    Hi Luisete,
    Maybe the problem arise because you are En- and DeQueue in parallel. You do a lot of things in parallel, that is nice if you are sure that one loop doesn't have to wait for another loop. Make sure you don't dequeue before enqueue.
    Hope this helps
    I never knew that the standard error cluster output could be wired directly to the loop control of a while loop.
    First time I see this

  • Hi. I am having an issue with music on my Ipod. It would probably be easier to explain my specific issue: I have songs by Band of Horses from Cease to Begin. When viewing my albums through cover flow, it shows Cease To Begin as two separate albums, one wi

    Hi. I am having an issue with music on my IPod. It would probably be easier to explain my specific issue: I have songs by Band of Horses from Cease to Begin. When viewing my albums through cover flow, it shows Cease To Begin as two separate albums, one with only Islands on the Coast, and the other having Islands on the Coast with 3 other songs. If I delete the album with only one song from my IPod, it deletes the song from the other "album" as well. If I go to "All Songs" by Band of Horses, it only shows one Islands on the Coast, so it is not a duplicate issue. Also, in Itunes, it only shows one album. I just recently updated to iOS5 on my 4th Gen IPod Touch, if that helps.

        Hello APVzW, we absolutely want the best path to resolution. My apologies for multiple attempts of replacing the device. We'd like to verify the order information and see if we can locate the tracking number. Please send a direct message with the order number so we can dive deeper. Here's steps to send a direct message: http://vz.to/1b8XnPy We look forward to hearing from you soon.
    WiltonA_VZW
    VZW Support
    Follow us on twitter @VZWSupport

  • Problem with event handling

    Hello all,
    I have a problem with event handling. I have two buttons in my GUI application with the same name.They are instance variables of two different objects of the same class and are put together in the one GUI.And their actionlisteners are registered with the same GUI. How can I differentiate between these two buttons?
    To be more eloborate here is a basic definition of my classes
    class SystemPanel{
             SystemPanel(FTP ftp){ app = ftp};
             FTP app;
             private JButton b = new JButton("ChgDir");
            b.addActionListener(app);
    class FTP extends JFrame implements ActionListener{
               SystemPanel rem = new SystemPanel(this);
               SystemPanel loc = new SystemPanel(this);
               FTP(){
                       add(rem);
                       add(loc);
                       pack();
                       show();
           void actionPerformed(ActionEvent evt){
            /*HOW WILL I BE ABLE TO KNOW WHICH BUTTON WAS PRESSED AS THEY
               BOTH HAVE SAME ID AND getSouce() ?
               In this case..it if was from rem or loc ?
    }  It would be really helpful if anyone could help me in this regard..
    Thanks
    Hari Vigensh

    Hi levi,
    Thankx..
    I solved the problem ..using same concept but in a different way..
    One thing i wanted to make clear is that the two buttons are in the SAME CLASS and i am forming 2 different objects of the SAME class and then putting them in a GUI.THERE IS NO b and C. there is just two instances of b which belong to the SAME CLASS..
    So the code
    private JButton b = new JButton("ChgDir");
    b.setActionCommand ("1");
    wont work as both the instances would have the label "ChgDir" and have setActionCommand set to 1!!!!
    Actually I have an array of buttons..So I solved the prob by writting a function caled setActionCmdRemote that would just set the action commands of one object of the class differently ..here is the code
    public void setActionCommandsRemote()
         for(int i = 0 ; i <cmdButtons.length ; i++)
         cmdButtons.setActionCommand((cmdButtons[i].getText())+"Rem");
    This just adds "rem" to the existing Actioncommand and i check it as folows in my actionperformed method
         if(button.getActionCommand().equals("DeleteRem") )          
                        deleteFileRemote();
          else if(button.getActionCommand().equals("Delete") )
                     deleteFileLocal();Anyway thanx a milion for your help..this was my first posting and I was glad to get a prompt reply!!!

  • I am having a issue with getting data useage alerts for my iphone 4s

    I am having a issue with getting data useage alerts for my iphone 4s from AT&T.  I do not download anything huge at all.
    I looked into it and figured out that the phone dials out nightly at 12:29am every night.   I went into my settings and went to general..about..diagnostics and useage..then diagnostics and useage data to see this.  I then clicked don't send...but I am still getting useage alerts.  Can anyone help me please...
    Thanks

    Honestly, from reading the thread linked, they all come off as a bunch of whiney people that cannot be bothered to help themselves.
    Little to nothing in that thread indicates an issue beyond inept consumers.  Yes, I read several pages on the incessant gripes.  Very few made any actual attempts to troubleshoot issues before whining about the "Apple issue" and those that did actual troubleshooting got their issues resolved.
    So no, Apple has nothing to fix beyond a few specific devices that are experiencing hardware issues.
    If you have actually put forth effort and done the basic troubleshooting, take the device to Apple for evaluation and possible replacement.  Whining will get nothing accomplished.

  • I am having major issues with links in keynote! Even though the links (a navigation system) are on the master page, they are only working on some of my slides. Anyone have ideas on how to fix this or similar issues? Help!

    I am having major issues with links in keynote! Even though the links (a navigation system) are on the master page, they are only working on some of my slides. Anyone have ideas on how to fix this or similar issues? Help!
    I have created a navigation system on the master pages and set the presentation to links only mode. I also have other links scattered throughout the program, like a linkable table of contents, etc. Some of them work, some of them don't. Not sure why. Anyone out there having similar issues? Or have any idea on how I can solve this issue? Any help would be appreciated!
    Thanks!

    Links should not create any problems in Keynote.  If they are set up correctly on text, the text will be underlined. Objects that have links will have a curved arrow bottom right, if you click the arrow a popup will display the link information.
    Try this repair for Keynote,  ensure you complete all the tasks and in the order shown:

    delete all the iWork applications if you have them, not just Keynote, using Appcleaner from Mac Update, its a freeware application

    empty the trash:  Finder > Empty Trash

    Shut down your Mac, wait 30 seconds, then power on the Mac, immediately after the start chime, hold down the Shift key
    When you see the grey Apple symbol and progress indicator (a spinning gear), release the Shift key.
    If you are prompted to log in, type your password, then hold down the Shift key again as you click Log in.
    4  
    Let the Mac fully boot up, it will take longer as the OS is repairing the drive

    when fully booted, go to Applications > Utilities > Disc Utility; click on the boot drive then First Aid tab and click  repair disc permissions

    when complete, restart the Mac normally, Apple menu > Restart

    install Keynote from the Mac App Store
    let us know if this helped

  • How can I recover an old/disused iCloud account. I was having some issues with my apple id so I restored my iPad, I am now stuck on the activation screen as I no longer use the iCloud account i used to set up the iPad and can't remember the address or pas

    How can I recover an old/disused iCloud account. I was having some issues with my apple id so I restored my iPad, I am now stuck on the activation screen as I no longer use the iCloud account i used to set up the iPad and can't remember the address or pas

    I have the same problem - it is maddening. I rely on this iPad for work so this is not just an annoyance! The above solutions of changing the appleid on the device or on the website do not work.
    The old email address no longer exists - I haven't used it in a year probably and I no longer have the account.  I logged into the appleid website and there is no trace of the old email address so there is nothing that can be deleted or changed there.  On the iPad there is no trace of the old email address so nothing can be deleted there either. I have updated the iPad software and the same problem comes right back.  Every 2 seconds I am asked to log in using the old non-existent email.  The device is currently useless.
    The only recent change to anything was the addition of an Apple TV device, which was set up using the correct login and password.
    Does anyone have any ideas? The iPad has been backed up to the iCloud so presumably it now won't recognize the current iCloud account? So restoring may notbe an option?

  • I am having an issue with my iphone4s. It will no longer connect to wifi.

    I am having an issue with my iphone4s. It will no longer connect to wifi. The wifi icon is grey and cannot be turned on. How can this be rectified?

    A simple search of google or the forums would have revealed http://support.apple.com/kb/TS1559

  • HT1925 I am having an issue with loading Itunes. I receive a missing dll file notice. Then another error message. I have reinstalled Windows & still get the error. I did not get the error until I recently did an ITunes update.

    I am having an issue with ITunes after a recent ITunes update. I can not open ITunes, I get a message missing MSVCR80.dll file, Then an error 7 message. I have redone the OS for Windows 7 and restarted the computer. I keep getting the errors.

    Do the following:
    Uninstall from Windows the following five programs: iTunes, Apple Software Update, Apple Mobile Device Support, Bonjour and Apple Application Support. You do this from an applet in Control Panel called Programs & Features (in Windows 8, 7, or Vista) or Add or Remove Programs (in Windows XP).
    Download the latest version of iTunes from Apple and note the location you're saving it to so you can find it once it's done.
    Run the iTunes installation as an administrator, just Right click iTunes installer and Run as Administrator.

  • Since updating my iPhone 4 to iOS 5.1 I'm having compatibility issues with my speakers and my iTunes wifi sync isn't working. Anyone else having the same problems?

    Since updating my iPhone 4 to iOS 5.1 I'm having compatibility issues with my speakers / docking station and my iTunes wifi sync isn't working. Anyone else having the same problems? Both worked fine until the update...

    Okay. I got it working again by setting it up as a new phone instead of just syncing. Then I backed up. All is good today.

Maybe you are looking for

  • REMOVING  ADMINISTRATOR FROM iMac G4 Flat Screen

    I have a new MacBook Pro and have given my iMac G4 Flatscreen to my wife for her personal use. I was the Original Administrator on the machine and she was a user. She is now also an Administrator and I wan't to delete all reference to my account and

  • Adobe Viewer App ipad Bug?

    I use the Adobe Viewer App on an ipad4. After the latest update the folios which i download and view are fe. after an hour away when i put the ipad an standby. I always have to download the issues again. But if i go to the settings/delete issues it s

  • Sendmail issues

    Hello all, I have Apache, PHP, MySQL and phpMyAdmin set up and running well on my iMac (10.5.4) development computer. I am trying to use the mail(); feature in PHP but I do not think everything is configured properly and am looking for some help. I h

  • Swing DnD Crashes on Mac OS X

    I've created an application with 5 colums, each with a JList. I'm using a transfer handler assigned to each JList. The JLists holds JComponents that can be dragged from one JList to another. This works beautifully on a PC, but crashes on Mac OS X usi

  • Best output out of Logic Pro Technical Annlylist

    Hi, we are currently running the Tascam Fw1884 mixer in one of our studios and wanted to know if there is a better alternative audio interface that can preview sounds from the application better. We are running Mac G5 with Logic pro and use headphone