Interger.parseInt (PLEASE SOMEBODY HELP ME)

I'm getting the following error when using Interger.parseInt:
C:\Binary Files>javac IntsLookup.java
IntsLookup.java:9: cannot find symbol
symbol : variable Interger
location: class IntsLookup
int x = Interger.parseInt(args[0]);
^
1 error
So, if anybody kowns how to use Interger.parseInt, Please help. Here is the code that I'm using:
import java.io.*;
class IntsLookup{
public static void main(String[] args){
try{
DataInputStream in = new DataInputStream(
new FileInputStream("IntFile"));
int x = Interger.parseInt(args[0]); //where the problem is coming
int count = 0;
while(in.available()>0){
int k = in.readInt();
if(k == x) count++;
in.close();
System.out.println(count + " occurrences of" + x);
catch(IOException e){
e.printStackTrace();
With this code I'm just trying to read a binary file called, " IntFile "...
Please help if you know. Thankx in advance.
Joyce

My point exactly. I enjoy helping people with their java problems, that's why I'm here.
If someone doesn't know it should be Interger instead of Integer, that isn't a java problem. It's a general spelling problem. I'm not going to tell them so. Instead, I'll give them some (sarcastic, yes) hints in the hope that they'll actually learn something. Like where the javadocs are.

Similar Messages

  • Upgrading to 7 - Can't uninstall 6 **PLEASE PLEASE PLEASE somebody help!**

    I keep trying to install iTunes 7 (have a 1G Nano), but am getting error messages. When I try to install, it gives me a box that says:
    "This installation cannot directly upgrade the version of iPod software found on this computer. Please uninstall the iPod software and try again." [OK]
    So, I've totally uninstalled iTunes and QuickTime and tried to reinstall, and keep getting the same message. Help!
    I've searched/found anything to do with Apple/iTunes/iPod/QT,and deleted them. Deleted the Win32 Temp file too.
    I've used regedit, deleted everything iTunes, Apple and Quicktime. Used MCISUU to uninstall installers.
    Tried everything on the Apple support page that was suggested.
    PLEASE PLEASE PLEASE somebody help!
    PC   Windows XP   Pentium IV 1.4Ghz 1 GB RDRAM

    I have the same problem - it seems like the old version is stuck on my computer even though I can't see it and when I try to download iTunes again it says to remove the old version first. Is there any help for this? Should I just try to download iTunes on another computer and use that instead? I feel like there is no hope for this!

  • HT1222 Please somebody help me! if how i can retrieve my notes?

    Please somebody will help me because my note in iphone5 when i connect to itunes my notes deleted all... how i can retrieve it? thanks and regards...

    Notes are designed to be synced to a supported application on the computer or a cloud service.  Sync them back.

  • Please somebody help me lost audio after opened logic 9 and X at the same time helpppp

    helppp please lost audio after opened logic9 and X together can't find the solution  i only have audio in the main output of my audio interface gott a motu 828 MKII somebody help me please

    Hello all looks normal when the problem was presented simultaneously opened LPX LP9 and when you return to open a new project or the same project and I only have audio in my headphones output interface, my interface is a motu 828Mk2 the project exists and the interface looks normal in every normal output comprises all looks normal just never sounds like it had passed but never opened the two programs at the same time not to do, I use a digital mixer yamaha normal surface responds as ccontrolador all seems to work perfect but I only have audio output from the headphones even if I motu channel by channel and I assign output sound headset

  • I switched phone with my brother and i could sucessfully restore everything to the new phone except my imessages. how can i restore them? and why this phone doesnt let my use my number, just my apple id for immesage/facetime? please somebody help me!!

    after restoring all my stuff to the new phone, i wanted to see my messages but i discovered that all my imessages are missing. i checked in settings and i dont know why but the new phone doesnt let me use my phone number for imessage or facetime, instead it's using just my apple id. any idea how can i switch to the phone number again? in my old phone i used both my number and email for imessages, so i think maybe thats why i cant see my immessages now. please somenone help me!! thank you so much

    Hi Katrina - I hear what you are saying about the problems. I've been using a BB Pearl here in Canada since January and I had the same problems with PocketMac from the start. iCal dates getting strangely duplicated after syncing and contacts in AddressBook groups getting listed twice on the BB. The only solution I used was to have the Mac always override the BB when syncing. NOt perfect but for me it was the simplest way to ensure the consistency of the data and my own sanity.
    If anyone has a better solution that actually allows a clean sync I'd love to hear it.

  • My bb curve 8520 refuses to connect to my home wifi please somebody help me

    i have had my bb curve 8520 for about 6 months now a not being the most hi-tech person in the world i have just downloaded bb app world altough i have managed to sucessfuly download a couple of free new apps to my bb    
    ( battery booster and the sky sports live football scores app ) then i tried to down load TuneIn radio app as i like to listen to music when going to sleep and was fed up with using my top-up to keep paying for single tracks off the vodafone site at first the radio app just would not download that was at 4am this morning so this afternoon i thought i would give it another try and after a quite along wait it finally downloaded brillient thinks me but then when i went to use it i tried to connect to the USE WIFI ONLY option as i had just run out of credit  but the wifi just will not let me connect to this app or website whatever it is i went to the connections on the home screen and selected wifi and connected it it said it was connected sucessfully so tried the app again but to no avail i have looked through a lot of posts on this forum and tried absolutly every thing that others have suggested some even say about not having a network service plan ( which i presume is your web monthly web allowance megabytes and that i hope anyway) but i know for a fact that i have one as i pay 5 pounds a month for 500mb and when i rang my account balance number this morning to use the vodafone I.O.U service it told me that my web allowance had been used so is there any one who can help me if this is the case about some websites and apps not being available unless you have or your service is paid upto date the why has it the wifi only option on the app and after it refuses me access to this app a screen pops up saying reload the screen but right at the top of the screen next to the app name there is a red warning triangle and next to it says" IO error :Tunnel...." 
       please is there any body out there that can help me with this its driving me mad thank you to anyone in advance if you can help with this 

    please please someone help me out T_T
    «..:itufa¤Pitufo::..»

  • HELP! I'm pretty sure I have a virus. everytime I shut down my mac and open it the background changes. the only thing i've downloaded was a software upgrade. I just recently got this mac so have no idea how to fix it. Please somebody help me!!

    I have just recently got a Mac, didn't buy an anti virus or anything because the store man said it wasn't necessary.
    After two weeks of use this update software notification kept poping up, so I did and now everytime I turn my Mac on the background changes.
    I've heard that this is how the Mac viruses start, I'm very new to this please somebody tell me how to fix it!!

    There are no viruses for osx.
    You are still under warranty.  Call Apple Care. Make sure you get a case number as all repairs have an additional 90 days of warranty. 
    #1 - You have 14 days from the date of purchase to return your computer with no questions asked.
    #2 - You have 90 days of FREE phone tech support.
    #3 - You have the standard one year Apple warranty.
    #4 - If you've purchased an AppleCare Protection Plan, your warranty last for 3 years.   You can obtain AppleCare anytime up to the first year of the purchase of your computer.
    Take FULL advantage of your warranty.  Posting on a message board should be done as a last resort and if you are out of warranty or Apple Care has expired.

  • Please somebody help  Flash Media Server 4

    I've installed Flash Media Server 4 (I tried on i686 and x86 with CentOS)
    also have uploaded applications to /opt/adove/fms/applications/test
    here what I see in log files:
    Connection rejected by server. Reason : [ Server.Reject ] : (_defaultRoot_, _defaultVHost_) : Application (test/_definst_) is not a valid signed application; loading access denied.
    please somebody help

    Are you sure that you are using adminconsole from location which mamata specified and not using some old adminconsole from you previous installation or something. I suspect you might be using older adminconsole.swf
    You can also get same information using getLicenseInfo Admin command.
    Please change your Users.xml to all getLicenseInfo or All. Open Users.xml under conf directory and you should find below text:
    <AdminServer>
    <HTTPCommands>
    <!-- Enable or disable using HTTP requests to execute admin commands.     -->
    <!-- Set to "true" to enable, otherwise it will be disabled.  The           -->
    <!-- actual commands permitted for server admin and virtual host admin    -->
    <!-- users can be set in the Allow and Deny elements.                                       -->
    <Enable>${USERS.HTTPCOMMAND_ALLOW}</Enable>
    <!-- List of server admin commands that can be accessed via HTTP.         -->
    <!-- Add multiple commands separated by commas.  "All" indicates          -->
    <!-- every command (it's not recommended to allow all commands).          -->
    <!-- Seperate multiple commands with commas.                              -->
    <Allow>ping</Allow>
    <!-- List of server admin commands denied access via HTTP.                -->
    <!-- Add multiple commands seperated by commas.  "All" indicates          -->
    <!-- every command.                                                       -->
    <Deny>All</Deny>
    <!-- Processing order for deny and allow command lists.  "Deny,Allow"     -->
    <!-- means the command will be allowed if the command is in the allow     -->
    <!-- list or not in the deny list.   "Allow,Deny" means the command       -->
    <!-- will be allowed if it is in the allow list and not in the            -->
    <!-- deny list.                                                           -->
    <Order>Deny,Allow</Order>
    </HTTPCommands>
    </AdminServer>
    </Root>
    Now change above content to below content:
    <AdminServer>
    <HTTPCommands>
    <!-- Enable or disable using HTTP requests to execute admin commands.     -->
    <!-- Set to "true" to enable, otherwise it will be disabled.  The           -->
    <!-- actual commands permitted for server admin and virtual host admin    -->
    <!-- users can be set in the Allow and Deny elements.                                       -->
    <Enable>${USERS.HTTPCOMMAND_ALLOW}</Enable>
    <!-- List of server admin commands that can be accessed via HTTP.         -->
    <!-- Add multiple commands separated by commas.  "All" indicates          -->
    <!-- every command (it's not recommended to allow all commands).          -->
    <!-- Seperate multiple commands with commas.                              -->
    <Allow>All</Allow>
    <!-- List of server admin commands denied access via HTTP.                -->
    <!-- Add multiple commands seperated by commas.  "All" indicates          -->
    <!-- every command.                                                       -->
    <Deny></Deny>
    <!-- Processing order for deny and allow command lists.  "Deny,Allow"     -->
    <!-- means the command will be allowed if the command is in the allow     -->
    <!-- list or not in the deny list.   "Allow,Deny" means the command       -->
    <!-- will be allowed if it is in the allow list and not in the            -->
    <!-- deny list.                                                           -->
    <Order>Deny,Allow</Order>
    </HTTPCommands>
    </AdminServer>
    </Root>
    Once you made the change , restart FMS and FMS Admin Server.
    Once both services are restarted, open a browser and put following text in address bar and hit enter (replace necessary stuff like server-ip,AdminUserId and AdminUserPassword to your FMS ip, FMS Admin User and FMS Admin Password respectively)
    http://<serverip>:1111/admin/getLicenseInfo?auser=<AdminUserId>&apswd=<AdminUserPassword>
    Result displayed should have which edition you are using.

  • I updated my computer to the os x and now i can't export my videos to quicktime i got the new compressor still won't let me please somebody help

    i updated my computer to the os x and now i can't export my videos to quicktime i got the new compressor still won't let me please somebody help

    You need to update the software. This is a very old version that will not work with the current OS. Did you purchase the software from the App Store? If do sign in with the Apple ID used to buy it. Go to the Purchases page and find the software.

  • TNT On Demand Unable to Sign In - Please somebody help me

    This is my third plea for help.  The only reason I went with FIOS was to get Showtime On Demand and TNT On Demand.  I don't have a TV.  I watch exclusively on line.   Showtime works great.  But I am unable to log into TNT On Demand.  It did work two weeks ago using Chrome but not Microsoft Internet Explorer.  Now neither works. 
    In Chrome I get the following message:
    This website requires the Flash 10.2 (or higher) player.
    You may upgrade your Flash plug-in by visiting the Flash Download Center.
    Please note you may need to reboot your system.
    I have Flash 11.6.
    Then I get this:
    Authentication Error
    A timeout or configuration error caused this operation to fail. The error has been logged. Please try again.
    In Microsoft Explorer I get no error messages.  I just loop over and over to the sign on screen.
    TNT help and support (which is very minimal) specifically states if we are a Verizon customer to contact Verizon customer support. 
    If you google this problem you will see the same complaint over and over.  Then usually some Verizon person tells the customer that they will be contacted privately and I presume somehow the problem is resolved but the solution is never posted on line.
    So please help me fix my problem.
    I spent 45 minutes on line with someone a few days ago with no result.  But he did something so that now I have to log into Facebook, Amazon, Hulu, Verizon, etc. over and over and over and my login is never saved.  When a tech specialist changes a setting they ought to let the customer know what is being changed so the customer can undo it.  This is most annoying.
    And people, responding with "my computer works fine" isn't helpful.  I know it works fine for someone else.  It doesn;t work fine for me.
    Pretty soon the new episodes of TNT Monday Morning and Southland will have scrolled off and I will miss them.  I am getting desperate.
    Solved!
    Go to Solution.

    carolamrt wrote:
    This is my third plea for help.  The only reason I went with FIOS was to get Showtime On Demand and TNT On Demand.  I don't have a TV.  I watch exclusively on line.   Showtime works great.  But I am unable to log into TNT On Demand.  It did work two weeks ago using Chrome but not Microsoft Internet Explorer.  Now neither works. 
    In Chrome I get the following message:
    This website requires the Flash 10.2 (or higher) player.
    You may upgrade your Flash plug-in by visiting the Flash Download Center.
    Please note you may need to reboot your system.
    I have Flash 11.6.
    Then I get this:
    Authentication Error
    A timeout or configuration error caused this operation to fail. The error has been logged. Please try again.
    In Microsoft Explorer I get no error messages.  I just loop over and over to the sign on screen.
    TNT help and support (which is very minimal) specifically states if we are a Verizon customer to contact Verizon customer support. 
    If you google this problem you will see the same complaint over and over.  Then usually some Verizon person tells the customer that they will be contacted privately and I presume somehow the problem is resolved but the solution is never posted on line.
    So please help me fix my problem.
    I spent 45 minutes on line with someone a few days ago with no result.  But he did something so that now I have to log into Facebook, Amazon, Hulu, Verizon, etc. over and over and over and my login is never saved.  When a tech specialist changes a setting they ought to let the customer know what is being changed so the customer can undo it.  This is most annoying.
    And people, responding with "my computer works fine" isn't helpful.  I know it works fine for someone else.  It doesn;t work fine for me.
    Pretty soon the new episodes of TNT Monday Morning and Southland will have scrolled off and I will miss them.  I am getting desperate.
    For TNT online with IE when I switched to compatability mode in the browser the login began to work.  Make sure your Flash settings allow for sight storage for turner.com and the adobe authorization site.  Also make sure your privacy setting always accept first party and session cookies.  I posted more details in another thread.

  • Soundtrack Pro 2 keeps crashing...please somebody help :(

    So here's my problem.
    I am running Soundtrack Pro 2 on my Mac Pro along with my Digi003. Both Final Cut Studio 2 and Logic Studio 8 are installed on my computer. Every application works fine except for STP2 that keeps crashing all the time.
    I tried to uninstall it, reinstall it, reinstall Compressor, downloaded updates, Core Audio updates as well for the 003, downloaded the last Pro Applications Support but nothing seems to cut it.
    The issue is as follow. I launch STP, the application scans (for the hundredth time) my plugins and detects something like 287 plugins. HOWEVER, the application crashes when the counter goes to 290.
    My personal feeling is that the problem might come from either a conflict between Final Cut Studio 2 and Logic Studio 8 that installed both STP2 or, most likely, three plugins (the difference between 290 and 287) that STP2 has a problem with.
    These last plugins scanned seem to be Amplitube X-Gear, a demo I deleted, Melodyne, that I downloaded lately and I guess something else. Also, I precise that I have not been able to rn STP for almost a year and as I am about to work on the post of a new film, I would love to use it.
    The last thing I did was running the Terminal app that gave me a detailed report of the problem. I don't understand where it comes from though. So here's the report. If somebody can help, I greatly appreciate it!
    Terminal Report :
    Last login: Tue Nov 4 12:04:29 on console
    /Applications/Soundtrack\ Pro.app/Contents/MacOS/Soundtrack\ Pro; exit
    Welcome to Darwin!
    romain-battaglias-computer:~ Romain$ /Applications/Soundtrack\ Pro.app/Contents/MacOS/Soundtrack\ Pro; exit
    Soundtrack Pro(501,0xa000d000) malloc: * Deallocation of a pointer not malloced: 0x740073; This could be a double free(), or free() called with the middle of an allocated block; Try setting environment variable MallocHelp to see tools to help debug
    Soundtrack Pro(501,0xa000d000) malloc: * Deallocation of a pointer not malloced: 0x2f003c; This could be a double free(), or free() called with the middle of an allocated block; Try setting environment variable MallocHelp to see tools to help debug
    1
    2
    Soundtrack Pro(501,0xa000d000) malloc: * Deallocation of a pointer not malloced: 0x10d8b000; This could be a double free(), or free() called with the middle of an allocated block; Try setting environment variable MallocHelp to see tools to help debug
    IKDriverAPI::Allocate
    IKDriverAPI::IKDriverAPI
    IKDriverAPI::Connect
    IKDriverAPI::Disconnect
    IKDriverAPI::Free
    com.apple.soundtrackpro
    2008-11-04 12:34:19.153 Soundtrack Pro[501] NSExceptionHandler has recorded the following exception:
    NSUncaughtSystemExceptionException -- Uncaught system exception: signal 11
    Stack trace: 0x95a5c521 0xffffffff 0x9011072c 0xffffffff 0x2949295d 0x90ccf800 0x90ccf7da 0x90ccece2 0x90cd4354 0x0016a859 0x0016aad3 0x0016be76 0x0016c3bb 0x0016b527 0x9326fc9f 0x9326f8fc 0x9326ee45 0x93266479 0x93265ea9 0x93265b0a 0x95f2fd2d 0x95f2fff0 0x95f2ff10 0x0016dbc6 0x0016b4a6 0x0027fab4 0x927f2237 0x908553d2 0x9084cb51 0x927ea7c8 0x927f1769 0x9327a976 0x9327a860 0x9327a35d 0x93279f28 0x927f7f21 0x927f7d4b 0x915226c5 0x915225f6 0x915224c2 0x92df5084 0x9327811d 0x93277b37 0x932718c4 0x95e011b3 0x0027d129 0x0000352e 0x00003455 0x00000001
    2008-11-04 12:34:19.153 Soundtrack Pro[501] Exception raised during posting of notification. Ignored. exception: Uncaught system exception: signal 11
    Killed
    logout
    [Process completed]

    Probably an imcompatible plug-in.
    Try renaming the plug-in folder momentarily, see if it boots okay.
    If it does then you'll have to isolate which plug-in is causing the problem.

  • My IPod is not showing up in my Itunes, I tried my phone as well and it is not coming up either.  I have tried everything including uninstalling and reinstalling.  It worked the other day but it is not working now.  Please somebody help me!!! What to do?

    Hello,
    Can someone please help me!?  I am trying to put music on my IPod and it was working the other day.  I can not get itunes to recognize my Ipod.  I have tried to unistall and reinstall Itunes.  I have tried all the steps on the site and can't get it to come up.  I tried my IPhone which was also showing up just the other day and it also is not showing in Itunes!   Please help me.  I need to be able to put music on my IPod for my work. 

    I have sorted it myself!!
    Ipod is now in the top right corner, last time I clicked on it, it ejected it but by clicking on the actual ipod icon then it brings up your ipod. I restored it to factory settings and synced all my music and it now works again. Hope this can help anyone who ends up with the same problem.

  • Please somebody help me with this

    1.1 modify the application so that:
    i) Information about any foreign key constraints for the selected table is displayed eg as
    additional labels in the table editor window, or in a separate dialog window.
    You can choose how you wish to display this information.
    ii) An Update button is added for each text field in the display, which will attempt to update the corresponding field in the database table, from the current data in the textfield. The following code will retrieve the current value from a JTextField object:
    String newValue = textfieldName.getText();
    The following code will convert the string to a number:
    int newNumber = Integer.parseInt(newValue);
    Remember, an attempt to update a row in a table may fail if eg it tries to alter a
    foreign key to a value not currently recorded for any corresponding primary key
    that the foreign key refers to.
    An attempt to set a foreign key field to 'null' should always be successful.
    If the update attempt fails, the value in the displayed text field should revert to its
    original state, to maintain consistency with the database.
    import java.io.*;
    import java.sql.*;
    import java.util.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import oracle.jdbc.driver.*;
    * class JdbcCW
    * demonstration of Java client connecting to an Oracle DBMS
    * @author put your name here
    * @date December 2002
    public class JdbcCW extends JFrame{
    static String url = "jdbc:oracle:thin:@localhost:1521:orcl";
    static String initialquery = "select table_name from user_tables";
    static String nullstring = "null";
    private String user;
    private String pass;
    private Connection conn;
    private Statement stmt;
    private ResultSet results;
    private JComboBox tableChooser;
    private JButton editButton;
    private JButton exitButton;
    private JButton detailsButton;
    private JPanel panel1;
    private JPanel panel2;
    private String selectedTable;
    private Container cp;
    public static void main(String[] args) throws SQLException {
    JdbcCW demo = new JdbcCW();
    demo.show();
    * JdbcCW constructor method
    public JdbcCW() throws SQLException {
    super("Java/Oracle coursework");
    addWindowListener (new WindowAdapter() {
    public void windowClosing (WindowEvent evt) {
    System.exit(0);
    try {
    user =
    JOptionPane.showInputDialog("enter oracle username eg ops$c9999999");
    pass = JOptionPane.showInputDialog("enter oracle password eg 29feb80");
    if ( user.length() == 0 || pass.length() == 0)
    throw new Exception("no user name and/or password");
    DriverManager.registerDriver (new OracleDriver());
    conn = DriverManager.getConnection(url, user, pass);
    if (conn != null)
    System.out.println("Connected");
    catch (Exception e ) {
    e.printStackTrace();
    System.exit(0); // problems - abandon ship
    // now we can access tables in the database
    stmt = conn.createStatement();
    results = stmt.executeQuery(initialquery);
    boolean anyRecords = results.next();
    if ( ! anyRecords ) {
    JOptionPane.showMessageDialog (this, "No Tables in the database");
    System.exit(0);
    tableChooser = new JComboBox();
    do
    tableChooser.addItem(results.getString(1));
    while (results.next() ) ;
    selectedTable = (String) tableChooser.getSelectedItem();
    tableChooser.addActionListener (new ActionListener () {
    public void actionPerformed (ActionEvent evt) {
         changeTable();
    editButton = new JButton("Edit");
    editButton.addActionListener(new ActionListener () {
    public void actionPerformed(ActionEvent evt) {
         runEdit();
    exitButton = new JButton("Exit");
    exitButton.addActionListener(new ActionListener () {
    public void actionPerformed(ActionEvent evt) {
    System.exit(0);
    panel1 = new JPanel(); // panels have flow layout
    JLabel label1 = new JLabel("Choose Table");
    panel1.add(label1);
    panel1.add(tableChooser);
    panel2 = new JPanel();
    panel2.add(editButton);
    panel2.add(exitButton);
    cp = getContentPane();
    cp.add(panel1,BorderLayout.NORTH);
    cp.add(panel2,BorderLayout.SOUTH);
    setSize(300,200);
    setLocation(100,100);
    private void changeTable() {
    selectedTable = (String) tableChooser.getSelectedItem();
    * method runEdit runs a query to determine the structure of the
    * selected table in order to customise the table editor window
    private void runEdit() {
    System.out.println("Selected Table " + selectedTable);
    String query = "select column_name,data_type from user_tab_columns " +
         "where table_name = '" + selectedTable + "'";
    try {
         results = stmt.executeQuery(query);
    } catch (java.sql.SQLException e) {
         System.out.println("SQL Exception on query " + query);
         return;
    JdbcEdit tableEditor = new JdbcEdit(this,selectedTable,results);
    tableEditor.show();
    public ResultSet makeQuery(String query) {
         ResultSet results;
         try {
         results = stmt.executeQuery(query);
         } catch (SQLException e) {
         System.out.println("Query Failed " + query);
         return null;
         return results;
    } // end class JdbcGen
    * class JdbcEdit
    * oracle table editing dialog window
    * @author put your name here as well
    * @date December 2002
    class JdbcEdit extends JDialog {
    private JdbcCW parent;
    private Container cp;
    private Vector columnNames;
    private Vector dataTypes;
    private Vector editFields;
    private Vector rows;
    private int noOfColumns;
    private int currentRow = 0;
    * JdbcEdit constructor method
    * the parameter true makes the dialog window modal -
    * the parent frame is inactive as long as this window is displayed
    public JdbcEdit (JdbcCW parent, String tableName, ResultSet results) {
         super(parent,"table editor " + tableName, true);
         this.parent = parent;
    columnNames = new Vector();
    dataTypes = new Vector();
         editFields = new Vector();
         JPanel mainPanel = new JPanel();
         mainPanel.setLayout(new BoxLayout(mainPanel,BoxLayout.Y_AXIS));
    // boxLayout - components are added to mainPanel in a vertical stack
         try {
         boolean anyRecords = results.next();
         if ( ! anyRecords ) {
              JOptionPane.showMessageDialog (this, "No Detail for " +
                             tableName+ " in the database");
              return;
         do {
              String columnName = results.getString(1);
              String dataType = results.getString(2);
              System.out.println("Row " + columnName + " Type " + dataType);
              JPanel editPanel = new JPanel();
              JLabel colNameLabel = new JLabel(columnName);
              JTextField dataField = new JTextField(20);
              editPanel.add(colNameLabel);
              editPanel.add(dataField);
    // this would be a good place to add an Update button
              mainPanel.add(editPanel);
    // now store the columnName, dataType and data text field
    // in vectors so other methods can access them
    // at this point in time the text field is empty
              columnNames.add(columnName);
              dataTypes.add(dataType);
         editFields.add(dataField);
         }while (results.next() ) ;
         } catch (java.sql.SQLException e) {
         System.out.println("SQL Exception on query ");
         return;
    // get the data from the Oracle table and put the first
    // row of data in the text fields in the dialog window
         populateData(tableName);
    // find out which column(s) are part of the primary key and make these
    // textfields non-editable so the values can't be changed
    findPKConstraints(tableName);
    // this would be a good place to discover any foreign key constraints
         JPanel buttonsPanel = new JPanel();
         JButton exitButton = new JButton("Exit");
         exitButton.addActionListener(new ActionListener () {
         public void actionPerformed(ActionEvent evt) {
              closeWindow();
         JButton nextButton = new JButton("Next");
         nextButton.addActionListener(new ActionListener () {
         public void actionPerformed(ActionEvent evt) {
              showRow(true);
         JButton prevButton = new JButton("Prev");
         prevButton.addActionListener(new ActionListener () {
         public void actionPerformed(ActionEvent evt) {
              showRow(false);
         buttonsPanel.add(exitButton);
         buttonsPanel.add(nextButton);
         buttonsPanel.add(prevButton);
    cp = getContentPane();
         cp.add(mainPanel,BorderLayout.CENTER);
         cp.add(buttonsPanel,BorderLayout.SOUTH);
         pack();
    private void closeWindow() {
         dispose();
    private void populateData(String tableName) {
    int noOfColumns;
    // have to access the Statement object in the parent frame
         ResultSet tableData = parent.makeQuery("select * from " + tableName);
         try {
         boolean anyRecords = tableData.next();
         if ( ! anyRecords ) {
              JOptionPane.showMessageDialog (this, "No data in " +
                             tableName);
              return;
         rows = new Vector();
    noOfColumns = columnNames.size();
         do {
              String [] row = new String[noOfColumns];
              for (int i = 0; i < noOfColumns; i++) {        
              row[i] = tableData.getString(i+1);
              rows.add(row);
         } while (tableData.next() ) ;
         } catch (java.sql.SQLException e) {
         System.out.println("SQL Exception on query ");
         return;
    // Put the first row of data from the table into the test fields;
         String [] rowData = (String[]) rows.get(0);
         for (int i = 0; i < noOfColumns; i++) {
    // get the reference to a text field in the dialog window
    JTextField textField = (JTextField) editFields.get(i);
    // vector editFields holds a reference to each JTextField
    // in the visible dialog window
    // hence the next line of code puts the data retrieved from
    // the table into the relevant text field in the GUI interface
         textField.setText(rowData);
    // method showRow updates the textfields in the GUI interface
    // with the next row of data from the table ( if next is true)
    // or with the previous row of data from the table ( if next is false)
    private void showRow(boolean next) {
    if ( rows == null ) {
    System.out.println("table is empty");
         getToolkit().beep();
         return;
         if (next && currentRow < rows.size() - 1) {
         currentRow++;
         } else if (!next && currentRow > 0) {
         currentRow--;
         } else {
         System.out.println("No Next/Prev row " + currentRow);
         getToolkit().beep();
         return;
         String [] rowData = (String[]) rows.get(currentRow);
    int noOfAttributes = dataTypes.size();
         for (int i = 0; i < noOfAttributes; i++) {
         JTextField textField = (JTextField) editFields.get(i);
         textField.setText(rowData[i]);
    private void findPKConstraints(String tableName){
         String PK_ConstraintName = "none";
         String pkquery =
    "select owner,constraint_name from user_constraints " +
         "where table_name = '" + tableName + "' and constraint_type = 'P'";
    // have to access the Statement object in the parent frame
         ResultSet results = parent.makeQuery(pkquery);
         try {
         boolean anyRecords = results.next();
         if ( ! anyRecords ) {
              // if none just return - but print a debug message
              System.out.println("No primary key constraint found");
              return;
         } else {
              // There should only be one
              System.out.println("Owner = " + results.getString(1) +
                        " name = " + results.getString(2));
              PK_ConstraintName = results.getString(2);
              // Now find out which columns
              pkquery =
    "select Column_name, position from user_cons_columns"
              + " where constraint_name = '" + PK_ConstraintName
              + "'";
    // have to access the Statement object in the parent frame
              results = parent.makeQuery(pkquery);
              anyRecords = results.next();
              if ( ! anyRecords ) {
              // if none just return - but there must be at least one
              System.out.println("no columns found");
              return;
              } else {
              do {
                   System.out.println
    ("Name " + results.getString(1) +
                   " position " + results.getString(2))
                   int position = Integer.parseInt(results.getString(2));
                   JTextField primarykey =
    (JTextField)editFields.get(position - 1);
                   primarykey.setEditable(false);
              } while (results.next());
         } catch (java.sql.SQLException e) {
         System.out.println("SQL Exception on query " + pkquery);
         return;

    You're pretty optimistic if you think anyone is going to answer that. There are three very good reasons not to (each is good enough by themselves!).
    1. IT'S YOUR HOMEWORK, IT DOESN'T EVEN LOOK AS THOUGH YOU'VE TRIED. WE HELP WITH PROBLEMS, NOT PROVIDE SOLUTIONS, ESPECIALLY FOR HOMEWORK.
    2. Format your code. Use [ code] and [ /code] (without the spaces). And if you've used 'i' as an index variable, [ i] will result in switching to italics mode. Use 'j' as your index variable.
    3. Don't post your whole program, only the parts you're having trouble with (mostly not relevant for this question, as you don't seem to have trouble with any particular area)

  • Please somebody help with bt vision problem

    Ok here goes:
    after spending over two hours on the phone to BT's diabolically poor indian call centre's I though I might have more luck checking if anyone online has the same problem.
    Basically my bt vision box doesnt record and neither does it give me the option to access the recordings I have already made.
    The white bar at the top of the screen doesnt show the word "recordings" anymore.
    I've spoken to about 7 different advisors who claim there is no record on the system of me being a BT vision customer (i've been using it since august!!!) and when they can't fix my problem they usually just pass me to another (usually irrelavant) department.
    Anyone got any ideas? Or failing that a direct number for a uk based call centre?

    cogantroll wrote:
    Hi, thanks for your reply.
    It turns out (I found out from yet another call to the help desk) that the numpty who took an order from me to upgrade from BB option 2 to option 3 somehow cancelled my BT vision account. I've just been on the phone for an age trying to re-order my service. Now it appears that they've started my contract all over again!!! So it looks like i'll be spending my saturday morning onto the billing department sorting out that mess!
    Note to BT :YOUR INDIAN CALL CENTRES ARE SHOCKINGLY BAD!!!!!!!!!!!!!!!
    No one wants to spend 3 hours of their life on the phone trying to sort out somebody else's mistake.
    If only I could get virgin media in my area I would never have gone to BT.
    I have got Virgin Media in my area, and I haven't bothered, because they are, unfortunately, are just as bad.
    Bt's UK call centre staff are OK, if not excellent.
    You should ring 0800 800 900 early in the morning and you should get the UK call staff.
    They really know their stuff. They'll sort you out.
    Rank - Mostly Harmless.

  • Problems with my Ipod Nano 4g, Please somebody help me :-(

    I decided to buy my first ipod yesterday and I put all my songs on it and so on... But many songs don't work, I want to play them and the sign changes to that play sign but the song stands still. I can play forward in the song but it's still not playing. And after a few seconds it skips the song and plays the next one.
    What can I do? I saw many people with this problem on the internet, but no resolutions... I tried everything I was told to try:
    - The songs work fine on itunes.
    - I did reset my ipod a few times.
    - I tried to delete the songs from itunes and put them in again, didn't work either...
    What else can I do?
    Please help me

    I have the exact same problem. I returned my nano to apple about 2 weeks ago and they weren't able to duplicate it. I got the same nano back in the mail today, loaded up the songs that refused to play, and nothing was fixed.
    This is my 6th apple product and 4th that I currently use and sync with my library. The songs I play on my other apple products (4g classic, iphone 3g, 2g nano) work perfectly. When I put them on my 4g they don't. If I convert the file, and then turn it back to .mp3 format it works...but with a library of nearly 700 gigs of music it seems like a hassle I or other apple customers shouldn't have to deal with.
    I just got off the phone with a customer service rep, and he said the problem isn't with the nano, it's with the file. We got into a pretty good argument back and forth, but at the end of the day when file x works on every other product but this specific one, I'd say the problem lies with this one.
    I keep crossing my fingers for a firmware update that will fix this, but as it stands I'm stuck deciding on whether or not I just want to give up on the 4g or convert my library to another format and then re-convert it back.

Maybe you are looking for

  • MAP Viewer Configuration in OBIEE

    Hi guys! I'm trying to make the maps in OBIEE up and running but I have a strange problem...I've followed this tutorial: http://obieelive.blogspot.com/2012/06/map-viewer-configuration-in-obiee.html?utm_source=BP_recent and in the last steps in OBI EE

  • Phantom Context lookup or Is "java:" some kind of keyword ? ? ?

    I'm attempting to implement my own Context for capturing performance information out of a third party applications. I've run into a strange problem where the method call doesn't aways work even though the signature appears to be correct, with the onl

  • List of Standard Queries for SD, MM

    Hi Experts, Please provide the links for the list of Standard Queries for SD and MM modules. Will asign the points surely... Thanks, Sujeet

  • Bought AKG 120 USB microphone - Picks up to much background noise

    How can I reduce the hum? I bought the AKG 120 USB microphone for voiceover. I used a Seinnheiser ew100 G3 before - which worked okay. But I guess a condenser microphone is even more powerful and picks up more of what I did not want. When I compare t

  • Fetch data from JDT

    Hi , How to fetch data from JDT using method created in a Java Perspective(EJB) in our web dynpro component. Please suggest the ways to do it . Thanks Sonal