Help whit GUI and code separeted files !

Hi.. i have a problem...
i wanna have two classes one that has the code.. and the other that as the GUI formating... so they have to comunicate..
Example :
Code Class
public class EFClient   
    EFClientGUI gui;
    public EFClient(){ 
    public void dosomething(){
         gui = new EFClientGUI ();
         gui.Label1.getText(); ---> i get a nullpointexception here
}GUI CLASS :
public class EFClientGUI extends javax.swing.JFrame {
    public EFClient efClient;
    public EFClientGUI(String teste){      
        efClient=new EFClient();---> this will call the "code"
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {                                        
     try{
        efClient.dologin("Duarte","Rui");---- calls code class
     }catch(Exception ex){
         System.out.println(ex);
}here a littel explanation :
I run EFClientGUI ..... it calls EFClient... and designs.... tem i click the button and i trie to do the login.... the te login writes something to GUI...
can someone help ?

problem solved

Similar Messages

  • My MacBook just has a white screen and a flashing file with a question mark. Please help:(

    I don't really understand what's happening, but I tried to update the software. Then all these codes appeared on the screen so I help down alt, command and R and it then reset and now it's just a white screen with a flashing file and questionmark. Please help.

    That is a sign that the MBA cannot locate the OSX.  The storage drive may be damaged.
    LaurenDavie123 wrote:
    I help down alt, command and R and it then reset a
    What exactly did your reset? 
    Ciao.

  • PLease help! GUI and Data Structure

    Hey guys,
    It's for my school project.
    I have to write codes for GUI program for a order form.
    I'm pretty much done with layout and stuff, but I couldn't figure out how to give some regulation(?) on some of the field.
    For instantce, I have to regulate a user to type only two letter abbreviation on state(address) field and the Zip field has to be either 5 digit form or XXXXX-XXXX.
    I Also have to include code to filter the user input and display error message if they enter wrong information.
    Second, how to use actoinevent stuff?
    There are three product type: a,b, and c. If "a" be chosen, then the product name associating the "a" product has to be shown on the product name field(I used ComboBox), and the price for that product(for instance a-1) has to be shown on the price field.
    Third, It sounds stupid question, but how to display current date on the java program using API?
    Fourth, I have to load some of the order from external files(maybe text files) and display into the screen.
    Here is the code
    import java.util.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.ListSelectionEvent;
    class orderFormGUI extends JFrame {
         private JButton bSave, bExit, bLoad;
         private JLabel labelTitle;
         private JTextField fieldFName, fieldLName, fieldStreet, fieldCity,
                   fieldState, fieldZip;
         private JLabel labelFName, labelLName, labelStreet, labelCity, labelState,
                   labelZip;
         private String[] st = { "CA", "TX", "OR", "UT", "NM", "NY", "NY", "GA",
                   "IL", "TN", "MN", "WY" };
         private JComboBox comboPType, comboPName;
         private JLabel labelComboPType, labelComboPName;
         private String[] ct = { "Copmuter", "Printer", "Monitor" };
         private String[] cn = { "CMP1100", "CMP1500" };
         private String[] pn = { "PR500", "PR1000" };
         private String[] mn = { "D4000", "D8000" };
         private String[] x;
         private JTextField fieldTotalPrice, fieldProductPrice;
         private JLabel labelTotalPrice, labelProductPrice;
         private JTextField filedQty;
         private JLabel labelQty;
         private JTextField fieldOrderDate, fieldDeliveryDate;
         private JComboBox comboDeliveryOptions;
         private String[] dO = { "5 Days", "10 Days" };
         private JLabel labelOrderDate, labelDeliveryOptions, labelDeliveryDate;
         private ArrayList orderArray;
         private DefaultListModel lmodel;
         public void initComponents() {
              bSave.setActionCommand("Save");
              bLoad.setActionCommand("Load");
              bExit.setActionCommand("Exit");
              bSave.addActionListener(new ButtonListener());
              bLoad.addActionListener(new ButtonListener());
              bExit.addActionListener(new ButtonListener());
         public void ClearFields() {
              // Set all text fields to blank
              fieldFName.setText("");
              fieldLName.setText("");
              fieldStreet.setText("");
              fieldCity.setText("");
              fieldState.setText("");
              fieldZip.setText("");
         public orderFormGUI() {
              orderArray = new ArrayList();
              bSave = new JButton("Save");
              bLoad = new JButton("Load");
              bExit = new JButton("Exit");
              // set up labels and field size for GUI
              labelTitle = new JLabel("Order Form");
              fieldFName = new JTextField("", 30);
              labelFName = new JLabel("First Name: ");
              fieldLName = new JTextField("", 30);
              labelLName = new JLabel("Last Name: ");
              fieldStreet = new JTextField("", 12);
              labelStreet = new JLabel("Street: ");
              fieldCity = new JTextField("", 12);
              labelCity = new JLabel("City: ");
              fieldState = new JTextField("", 2);
              labelState = new JLabel("State: ");
              fieldZip = new JTextField("", 9);
              labelZip = new JLabel("Zip Code: ");
              comboPType = new JComboBox(ct);
              chooseProductName();
              labelComboPType = new JLabel("Product Type");
              comboPName = new JComboBox();
              labelComboPName = new JLabel("Product Name");
              fieldProductPrice = new JTextField("");
              labelProductPrice = new JLabel("Product Price: ");
              fieldTotalPrice = new JTextField("", 12);
              labelTotalPrice = new JLabel("Total Price: ");
              filedQty = new JTextField("", 12);
              labelQty = new JLabel("Quantity: ");
              fieldOrderDate = new JTextField("", 12);
              labelOrderDate = new JLabel("Order Date: ");
              comboDeliveryOptions = new JComboBox(dO);
              labelDeliveryOptions = new JLabel("Delivery Options: ");
              fieldDeliveryDate = new JTextField("", 12);
              labelDeliveryDate = new JLabel("Delivery Date: ");
              TextFieldHandler handler = new TextFieldHandler();
              fieldState.addActionListener(handler);
              // Construct GUI and set layout
              JPanel mine = new JPanel();
              mine.setLayout(null);
              mine.add(labelTitle);
              labelTitle.setBounds(150, 30, 100, 15);
              mine.add(fieldFName);
              fieldFName.setBounds(88, 80, 220, 21);
              mine.add(labelFName);
              labelFName.setBounds(16, 80, 134, 21);
              mine.add(fieldLName);
              fieldLName.setBounds(88, 110, 220, 21);
              mine.add(labelLName);
              labelLName.setBounds(16, 110, 134, 21);
              mine.add(fieldStreet);
              fieldStreet.setBounds(88, 150, 220, 21);
              mine.add(labelStreet);
              labelStreet.setBounds(16, 150, 134, 21);
              mine.add(fieldCity);
              fieldCity.setBounds(88, 180, 220, 21);
              mine.add(labelCity);
              labelCity.setBounds(16, 180, 134, 21);
              mine.add(fieldState);
              fieldState.setBounds(88, 210, 220, 21);
              mine.add(labelState);
              labelState.setBounds(16, 210, 134, 21);
              mine.add(fieldZip);
              fieldZip.setBounds(88, 240, 220, 21);
              mine.add(labelZip);
              labelZip.setBounds(16, 240, 134, 21);
              mine.add(comboPType);
              comboPType.setBounds(120, 280, 220, 21);
              mine.add(labelComboPType);
              labelComboPType.setBounds(16, 280, 134, 21);
              mine.add(comboPName);
              comboPName.setBounds(120,310, 220, 21);
              mine.add(labelComboPName);
              labelComboPName.setBounds(16, 310, 134, 21);
              mine.add(fieldProductPrice);
              fieldProductPrice.setBounds(120, 340, 220, 21);
              fieldProductPrice.setEditable(false);
              mine.add(labelProductPrice);
              labelProductPrice.setBounds(16, 340, 134, 21);
              mine.add(filedQty);
              filedQty.setBounds(120, 370, 220, 21);
              mine.add(labelQty);
              labelQty.setBounds(16, 370, 134, 21);
              mine.add(fieldOrderDate);
              fieldOrderDate.setBounds(120, 430, 220, 21);
              fieldOrderDate.setEditable(false);
              mine.add(labelOrderDate);
              labelOrderDate.setBounds(16, 430, 134, 21);
              mine.add(comboDeliveryOptions);
              comboDeliveryOptions.setBounds(120, 460, 220, 21);
              mine.add(labelDeliveryOptions);
              labelDeliveryOptions.setBounds(16, 460, 134, 21);
              mine.add(fieldDeliveryDate);
              fieldDeliveryDate.setBounds(120, 490, 220, 21);
              fieldDeliveryDate.setEditable(false);
              mine.add(labelDeliveryDate);
              labelDeliveryDate.setBounds(16, 490, 134, 21);
              mine.add(fieldTotalPrice);
              fieldTotalPrice.setBounds(120, 520, 220, 21);
              fieldTotalPrice.setEditable(false);
              mine.add(labelTotalPrice);
              labelTotalPrice.setBounds(16, 520, 134, 21);
              mine.add(bSave);
              bSave.setBounds(16, 550, 100, 21);
              mine.add(bLoad);
              bLoad.setBounds(130, 550, 100, 21);
              mine.add(bExit);
              bExit.setBounds(250, 550, 100, 21);
              this.setContentPane(mine);
              this.pack();
              this.setTitle("Order Form);
              Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
              setSize(380, 630);
         public void chooseProductName(){
              if ((ct).equals(ct[0])){
                   comboPName = new JComboBox(cn);
              }else if (ct.equals(ct[1])){
                   comboPName = new JComboBox(pn);
              }else if (ct.equals(ct[2])){
                   comboPName = new JComboBox(mn);
         public void comboPNameChanged(ItemEvent event){
              if (event.getStateChange() == ItemEvent.SELECTED);
         private void setTestData() {
              orderArray.add(makeOrder("1-100-1000"));
              orderArray.add(makeOrder("1-100-1001"));
              orderArray.add(makeOrder("1-100-1002"));
              for (Order temp : orderArray) {
                   if (temp.getOrder().equals("1-100-1000")) {
                        temp.setfName("a");
                        temp.setlName("s");
                        temp.setstreet("4802 Alaska Ave");
                        temp.setcity("Cypress");
                        temp.setzip("90630");
         private Order makeOrder(String order) {
              Order temp = new Order(order);
              return temp;
         private void loadDate(){
         String fn;
         JFileChooser fc = new JFileChooser();
         if(fc.showOpenDialog(this) == JFileChooser.APPROVE_OPTION){
              fn = fc.getSelectedFile().getName();
         if( !new File("objdata.dat").exist() ) {
              setTestData();
              for (Order temp: orderArray());
                   lmodel.addElement(temp.getOrder());)
         class Order {
              String orderid, fName, lName, street, city, state, zip;
              public Order(String order) {
                   orderid = order;
              public String getOrder() {
                   return orderid;
              public String getfName() {
                   return fName;
              public void setfName(String fName) {
                   this.fName = fName;
              public String getlName() {
                   return lName;
              public void setlName(String lName) {
                   this.lName = lName;
              public String getstreet() {
                   return street;
              public void setstreet(String street) {
                   this.street = street;
              public String getcity() {
                   return city;
              public void setcity(String city) {
                   this.city = city;
              public String getzip() {
                   return zip;
              public void setzip(String zip) {
                   this.zip = zip;
         private class TextFieldHandler implements ActionListener {
              public void actionPerformed(ActionEvent event) {
                   String string = " ";
                   if (event.getSource() == fieldState)
                        string = String.format("%s " + "is not correct form.", event
                                  .getActionCommand());
                   JOptionPane.showMessageDialog(null, string);
                   // System.out.println("Please use two letter abbreviation.");
    public class Main {
         public static void main(String[] args) {
              JFrame window = new orderFormGUI();
              window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              window.setVisible(true);
    {code}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Cross-posted:
    http://forum.java.sun.com/thread.jspa?messageID=10019967

  • .alx and .cod installation files

    Hello Team,
    We are looking for .alx and .cod file for Facebook and Twitter apps. Though, these are available as a freeware, the usage will be for corporate use and hence due to security threat, we cannot download it from world wide web.
    Can you assist us, how can we purchase the installation files form authorized sources? Your assistance will be appreciated.
    Thank You.
    Regards,
    Ashish

    Guys,
    Does any one have an idea, how to procure these installation files?
    Thank You.
    Regards,
    Ashish

  • Need help to open and look for file by name

    Hi,
            Im needing help to open a folder and look for a file (.txt) on this directory by his name ... The user ll type the partial name of file , and i need look for this file on the folder , and delete it ....
    How can i look for the file by his name ?
    Thx =)

    Hi ,
        Sry ,, let me explain again ... I ll set the name of the files in the follow order ... Name_Serial_date_chanel.sxc ..
    The user ll type the serial that he wants delete ...
    I already figured out what i need guys .. thx for the help ^^
    I used List Directory on advanced IO , to list all .. the Name is the same for all ... then i used Name_ concateneted with Serial(typed)* .. this command serial* ll list all serials equal the typed , in my case , ll exist only one , cuz its a count this serial .Then i pass the path to the delete , and its done !
    Thx ^^

  • Help with load and unload swf file.

    hello, just now i try, to  load my file using the code snippet 'load and unload' i manage to load the next file succesfully but why my recent file still appear in the background? how do i make it gone?

    When you load another SWF you're loading it 'inside' the current SWF but it appears that you want to replace the current SWF entirely with the new SWF, is that correct?
    If so you should make what's usually known as a 'stub' or a loader. Make an empty project that merely acts as a loader. It should load your first SWF and when you press a button on that first SWF to load a second SWF, it should signal the 'stub' it's loaded inside to unload the first SWF and then load the second.
    e.g. a stub.swf (just coding out of memory, not error checked, just to give a general idea):
    // make a new loader to do all the loading of SWFs
    var loader:Loader = new Loader();
    // and display
    addChild(loader);
    // a function to load a SWF into the loader (replacing any existing SWF)
    function loadSWF(path:String):void
         // assure path is defined or do nothing
         if (!path) return;
         // load requested SWF
         loader.load(new URLRequest(path));    
    // load initial SWF
    loadSWF('/path/to/1.swf');
    For your 1.swf to use the function, you're currently inside the .content property of a Loader so I believe you can just run a command like: Object(this.parent.parent).loadSWF('/path/to/2.swf');
    This example obviously lacks any error checking or transitions but you can add those and season to taste.

  • PLS help. Exract and use a file in rt.jar

    Hi all,
    On another thread I was told I might be able to do this. I have my rt.jar file (the class for the plugin). I need to able to allow my applet to use the hashmap and arraylist without the overhead of having to load the entire vm from SUN.
    I can view the contents and finding arraylist is simple but not HashMap. Any 1 know its location?
    Now if I do this I need to be able to package my own jar with them in. How do I define the imports for the java files? Do they need altering from:
    import java.util.Hashmap?
    Can someone pls help here im at my wits end :-(
    Thanks all

    Ta but I have jre 1.3 are the files i need in there?
    I have lots of collections classes as shown below
    contents of rt.jar
    java/util/AbstractCollection.class
    java/util/AbstractList$1.class
    java/util/AbstractList$Itr.class
    java/util/AbstractList$ListItr.class
    java/util/AbstractList.class
    java/util/AbstractMap$1.class
    java/util/AbstractMap$2.class
    java/util/AbstractMap$3.class
    java/util/AbstractMap$4.class
    java/util/AbstractMap.class
    java/util/AbstractSequentialList.class
    java/util/AbstractSet.class
    java/util/ArrayList.class
    java/util/Arrays$ArrayList.class
    java/util/Arrays.class
    java/util/BitSet.class
    java/util/Calendar.class
    java/util/Collection.class
    java/util/Collections$1.class
    java/util/Collections$2.class
    java/util/Collections$3.class
    java/util/Collections$4.class
    java/util/Collections$5.class
    java/util/Collections$6.class
    java/util/Collections$CopiesList.class
    java/util/Collections$EmptyList.class
    java/util/Collections$EmptyMap.class
    java/util/Collections$EmptySet.class
    java/util/Collections$ReverseComparator.class
    java/util/Collections$SingletonList.class
    java/util/Collections$SingletonMap$ImmutableEntry.class
    java/util/Collections$SingletonMap.class
    java/util/Collections$SingletonSet.class
    java/util/Collections$SynchronizedCollection.class
    java/util/Collections$SynchronizedList.class
    java/util/Collections$SynchronizedMap.class
    java/util/Collections$SynchronizedSet.class
    java/util/Collections$SynchronizedSortedMap.class
    java/util/Collections$SynchronizedSortedSet.class
    java/util/Collections$UnmodifiableCollection.class
    java/util/Collections$UnmodifiableList.class
    java/util/Collections$UnmodifiableMap$UnmodifiableEntrySet$UnmodifiableEntry.class
    java/util/Collections$UnmodifiableMap$UnmodifiableEntrySet.class
    java/util/Collections$UnmodifiableMap.class
    java/util/Collections$UnmodifiableSet.class
    java/util/Collections$UnmodifiableSortedMap.class
    java/util/Collections$UnmodifiableSortedSet.class
    java/util/Collections.class
    When I create my own jar with the extracted classes will it work in IE?

  • Help on parsing and storing XML file

    Hi :
    I have a huge file with a format similar to this.
    <EmployeeDB>
    <employee>
    <name>Steve</name>
    <salary>20000</salary>
    <address>898 nobel drive</address>
    <city>san diego</city>
    </employee>
    <employee>
    <name>Ray</name>
    <salary>20000</salary>
    <address>898 nobel drive</address>
    <city>san diego</city>
    </employee>
    <employee>
    <name>Prag</name>
    <salary>20000</salary>
    <address>898 nobel drive</address>
    <city>san diego</city>
    </employee>
    </EmployeeDB>
    I have a table in my database with 2 columns one is a nsystem generated id and another column is of xmlType.
    What I want to do is store each employee's XML as a seperate record.
    For example: My table data should look like this
    EmployeeID(Number) EmployeeXML (XMLType)
    1 <employee>
    <name>Steve</name>
    <salary>20000</salary>
    <address>898 nobel drive</address>
    <city>san diego</city>
    </employee>
    2 <employee>
    <name>Ray</name>
    <salary>20000</salary>
    <address>898 nobel drive</address>
    <city>san diego</city>
    </employee>
    What I need is a code to take the document and insert the records as above.
    Please send me the code if you have to [email protected]

    Yes, I am using oralce 9i release 2

  • Help on Collections and Code Modularization

    hi All,
    We have sqlplus script with lot of such statements. I am trying to modularize them. Below you will see original script and rewritten script to avoid repetitive code. In this case, there is only one table and multiple columns. I want to know how can I process mutiple tables with their columns in the same script? Do I have declare type record? Is it possible??
    Please suggest.
    Thanks,
    AK
    /*__Original part of Script -__* /
    DECLARE
    l_table_exists NUMBER;
    BEGIN
    l_table_exists := -1;
    SELECT COUNT(1)
    INTO l_table_exists
    FROM ALL_TAB_COLUMNS
    WHERE OWNER = '&SOMEOWNER'
    AND TABLE_NAME = 'TABLE1'
    AND COLUMN_NAME = 'TABLE1SCOLUMN1';
    --if Table does exist
    IF (l_table_exists = 1) THEN
    EXECUTE IMMEDIATE 'ALTER TABLE &SOMEOWNER..TABLE1 DROP COLUMN TABLE1SCOLUMN1';
    END IF;
    END;
    DECLARE
    l_table_exists NUMBER;
    BEGIN
    l_table_exists := -1;
    SELECT COUNT(1)
    INTO l_table_exists
    FROM ALL_TAB_COLUMNS
    WHERE OWNER = '&SOMEOWNER'
    AND TABLE_NAME = 'TABLE1'
    AND COLUMN_NAME = 'TABLE1SCOLUMN2';
    --if Table does exist
    IF (l_table_exists = 1) THEN
    EXECUTE IMMEDIATE 'ALTER TABLE &SOMEOWNER..TABLE1 DROP COLUMN TABLE1SCOLUMN2';
    END IF;
    END;
    /*---New to avoid repetitive code--*/
    DECLARE
    TYPE columnName_Type IS TABLE OF VARCHAR2(50);
    c_Cols CONSTANT columnName_Type := columnName_Type('COLUMN1', 'COLUMN2');
    l_ColumnExists NUMBER;
    BEGIN
    FOR i IN 1..c_Cols.COUNT
    LOOP
    SELECT COUNT(1)
    INTO l_ColumnExists
    FROM ALL_TAB_COLUMNS
    WHERE OWNER = '&SOMEOWNER'
    AND TABLE_NAME = 'TABLE1'
    AND COLUMN_NAME = c_Cols(i);
    --if Column exists
    IF (l_ColumnExists = 1) THEN
    EXECUTE IMMEDIATE ( 'ALTER TABLE &SOMEOWNER..TABLE1 DROP COLUMN '|| c_Cols(i) );
    END IF;
    END LOOP;
    END;

    Modularisation is critically important - good to see this being addressed.
    I would approach the problem by creating a special utility package that provides the upgrade/rollback steps - with logging.
    The package interface would look something as follows:
    create or replace package PatchLib as
      --// retrurns the version banner of the library
      function Version return varchar2;
      --// patch instructions
      procedure AddColumn( tableName varchar2, columnName varchar2, dataType varchar2 );
      procedure DropColumn( tableName varchar2, columnName varchar2 );
      ..procedure interfaces for adding/dropping constraints, indexes, etc  - with all procedures
      writing to a log table the parameters they are called with, where and when, the dynamic
      DDL created, and the result of the DDL..
    end;Each of the patch steps (procedures) will of course do the checks such as, does the table exists, can the column name be added (does it already exist) and so on.
    Your SQL*Plus patch script will include the latest version of PatchLib to install, together with the actual patch instructions. Something along the following lines:
    --// patch 5.4.3.2.1
    --// patchlib must be successfully installed for patching to
    --// happen, thus terminate script if there are errors
    whenever SQLERROR exit failure
    prompt Installing Patch Library
    @@patchlib.pks
    @@patchlib.pkb
    --// this will fail if PatchLib failed to compile successfully
    prompt Verifying PatchLib is okay..
    select PatchLib.Version() as VERSION from dual;
    --// whenever SQLERROR can now be turned off if needed
    prompt Executing patch instructions..
    begin
      PatchLib.AddColumn( 'EMP', 'SUPERVISOR', 'NUMBER(6)' );
      .. etc ..
    end;
    --// a select statement can now be used on the PatchLib log table to
    --// to display what the patch did
    select ...
    --// optionally, remove patchlib
    drop package PatchLib;
    prompt Patch installed.
    exitThe one issue to note is that a change to the PatchLib log table, will itself need to be done carefully - as changes to that table can invalidate PatchLib and cannot thus be done using PatchLib itself.

  • Hi can anyone help with a mac that had magnet put on it. I turned it on and then off but a white screen appears with a file with a question mark on it?

    Hi can anyone help with a mac that had magnet put on it. I turned it on and then off but a white screen appears with a file with a question mark on it?

    File icon with ? mark on it means it can't read from the hard drive. The hard drive is now wiped or bad. If just wiped then you will need to reinstall your operating system, OS X. If bad you will need to replace the drive.
    Start with booting the computer from the OS X install DVD that came with your system. If the Mac came with Lion Pre-Installed then you use the Lion internet recovery system to reinstall (Hold down Command+r keys or Command+Option+r keys to boot the computer from over the internet to the Lion recovery HD system).
    Good Luck.

  • HT3964 I just opened up my MacBook Pro after a few days of not using it and it was frozen. I turned it off and back on and all I see is a white screen, there was a file with a question mark flashing for a bit but I can't do anything, please help me!!

    I just opened up my MacBook Pro after a few days of not using it and it was frozen. I turned it off and back on and all I see is a white screen, there was a file with a question mark flashing for a bit but I can't do anything, please help me!!

    Jerricayoung,
    you have a 13-inch Mid 2012 MacBook Pro. It’s modern enough that it supports booting into Recovery mode. To do so, hold down a Command key and the R key as you start up. It should eventually show a Mac OS X Utilities menu. Select Disk Utility from that menu; when the Disk Utility window appears, select the bootable volume from the left-hand side of the window. (It’s typically called “Macintosh HD”.) When the volume is selected, some buttons will appear on the right-hand side. If it’s not greyed out, press the Verify Disk button; if it is greyed out, or if it reports on errors that it found, press the Repair Disk button. Once the verification/repair is completed, exit Disk Utility and select Restart from the Apple menu; that will restart your MacBook Pro in its normal mode. With luck, that will be enough to get you to your normal login screen, rather than the white screen.

  • (Urgent help needed) how to read txt file and store the data into 2D-array?

    Hi, I have a GUI which allow to choose file from the file chooser, and when "Read file" button is pressed, I want to show the array data into the textarea.
    The sample data is like this followed:
    -0.0007     -0.0061     0.0006
    -0.0002     0.0203     0.0066
    0     0.2317     0.008
    0.0017     0.5957     0.0008
    0.0024     1.071     0.0029
    0.0439     1.4873     -0.0003
    I want my program to scan through and store these data into 2D array.
    However for some reason, my source code issues errors, and I don't know what's wrong with it, seems to have a problem in StringTokenizer though. Can anybody help me?
    Thanks in advance.
    import java.io.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.util.StringTokenizer;
    public class FileReduction1 extends JFrame implements ActionListener{
    // GUI features
    private BufferedReader fileInput;
    private JTextArea textArea;
    private JButton openButton, readButton,processButton,saveButton;
    private JTextField textfield;
    private JPanel pnlfile;
    private JPanel buttonpnl;
    private JPanel buttonbar;
    // Other fields
    private File fileName;
    private String[][] data;
    private int numLines;
    public FileReduction1(String s) {
    super(s);
    // Content pane
         Container cp = getContentPane();
         cp.setLayout(new BorderLayout());     
    // Open button Panel
    pnlfile=new JPanel(new BorderLayout());
         textfield=new JTextField();
         openButton = new JButton("Open File");
    openButton.addActionListener(this);
    pnlfile.add(openButton,BorderLayout.WEST);
         pnlfile.add(textfield,BorderLayout.CENTER);
         readButton = new JButton("Read File");
    readButton.addActionListener(this);
         readButton.setEnabled(false);
    pnlfile.add(readButton,BorderLayout.EAST);
         cp.add(pnlfile, BorderLayout.NORTH);
         // Text area     
         textArea = new JTextArea(10, 100);
    cp.add(new JScrollPane(textArea),BorderLayout.CENTER);
    processButton = new JButton("Process");
    //processButton.addActionListener(this);
    saveButton=new JButton("Save into");
    //saveButton.addActionListener(this);
    buttonbar=new JPanel(new FlowLayout(FlowLayout.RIGHT));
    buttonpnl=new JPanel(new GridLayout(1,0));
    buttonpnl.add(processButton);
    buttonpnl.add(saveButton);
    buttonbar.add(buttonpnl);
    cp.add(buttonbar,BorderLayout.SOUTH);
    /* ACTION PERFORMED */
    public void actionPerformed(ActionEvent event) {
    if (event.getActionCommand().equals("Open File")) getFileName();
         if (event.getActionCommand().equals("Read File")) readFile();
    /* OPEN THE FILE */
    private void getFileName() {
    // Display file dialog so user can select file to open
         JFileChooser fileChooser = new JFileChooser();
         fileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
         int result = fileChooser.showOpenDialog(this);
         // If cancel button selected return
         if (result == JFileChooser.CANCEL_OPTION) return;
    if (result == JFileChooser.APPROVE_OPTION)
         fileName = fileChooser.getSelectedFile();
    textfield.setText(fileName.getName());
         if (checkFileName()) {
         openButton.setEnabled(false);
         readButton.setEnabled(true);
         // Obtain selected file
    /* READ FILE */
    private void readFile() {
    // Disable read button
    readButton.setEnabled(false);
    // Dimension data structure
         getNumberOfLines();
         data = new String[numLines][];
         // Read file
         readTheFile();
         // Output to text area     
         textArea.setText(data[0][0] + "\n");
         for(int index=0;index < data.length;index++)
    for(int j=1;j<data[index].length;j++)
    textArea.append(data[index][j] + "\n");
         // Rnable open button
         openButton.setEnabled(true);
    /* GET NUMBER OF LINES */
    /* Get number of lines in file and prepare data structure. */
    private void getNumberOfLines() {
    int counter = 0;
         // Open the file
         openFile();
         // Loop through file incrementing counter
         try {
         String line = fileInput.readLine();
         while (line != null) {
         counter++;
              System.out.println("(" + counter + ") " + line);
    line = fileInput.readLine();
         numLines = counter;
    closeFile();
         catch(IOException ioException) {
         JOptionPane.showMessageDialog(this,"Error reading File",
                   "Error 5: ",JOptionPane.ERROR_MESSAGE);
         closeFile();
         System.exit(1);
    /* READ FILE */
    private void readTheFile() {
    // Open the file
    int row=0;
    int col=0;
         openFile();
    System.out.println("Read the file");     
         // Loop through file incrementing counter
         try {
    String line = fileInput.readLine();
         while (line != null)
    StringTokenizer st=new StringTokenizer(line);
    while(st.hasMoreTokens())
    data[row][col]=st.nextToken();
    System.out.println(data[row][col]);
    col++;
    row++;
    closeFile();
    catch(IOException ioException) {
         JOptionPane.showMessageDialog(this,"Error reading File",
                   "Error 5: ",JOptionPane.ERROR_MESSAGE);
         closeFile();
         System.exit(1);
    /* CHECK FILE NAME */
    /* Return flase if selected file is a directory, access is denied or is
    not a file name. */
    private boolean checkFileName() {
         if (fileName.exists()) {
         if (fileName.canRead()) {
              if (fileName.isFile()) return(true);
              else JOptionPane.showMessageDialog(null,
                        "ERROR 3: File is a directory");
         else JOptionPane.showMessageDialog(null,
                        "ERROR 2: Access denied");
         else JOptionPane.showMessageDialog(null,
                        "ERROR 1: No such file!");
         // Return
         return(false);
    /* FILE HANDLING UTILITIES */
    /* OPEN FILE */
    private void openFile() {
         try {
         // Open file
         FileReader file = new FileReader(fileName);
         fileInput = new BufferedReader(file);
         catch(IOException ioException) {
         JOptionPane.showMessageDialog(this,"Error Opening File",
                   "Error 4: ",JOptionPane.ERROR_MESSAGE);
    System.out.println("File opened");
    /* CLOSE FILE */
    private void closeFile() {
    if (fileInput != null) {
         try {
              fileInput.close();
         catch (IOException ioException) {
         JOptionPane.showMessageDialog(this,"Error Opening File",
                   "Error 4: ",JOptionPane.ERROR_MESSAGE);
    System.out.println("File closed");
    /* MAIN METHOD */
    /* MAIN METHOD */
    public static void main(String[] args) throws IOException {
         // Create instance of class FileChooser
         FileReduction1 newFile = new FileReduction1("File Reduction Program");
         // Make window vissible
         newFile.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         newFile.setSize(500,400);
    newFile.setVisible(true);
    Java.lang.NullpointException
    at FileReductoin1.readTheFile <FileReduction1.java :172>
    at FileReductoin1.readFile <FileReduction1.java :110>
    at FileReductoin1.actionPerformed <FileReduction1.java :71>
    .

    1) Next time use the CODE tags. this is way too much unreadable crap.
    2) The problem is your String[][] data.... the only place I see you do anything approching initializing it is
    data = new String[numLines][];I think you want to do this..
    data = new String[numLines][3];anyway that's why it's blowing up on the line
    data[row][col]=st.nextToken();

  • Help whit open file!!!!!Urgent

    hi
    i have 1 great problen whit my servlet.
    I use Fop class for create pdf file from xml and class work very well, but i need translate this class in a servlet class and when open file on the fly in browser size of this is equals a 0kb why?
    this is may code:
    //Java
    import java.io.File;
    import java.io.OutputStream;
    import javax.servlet.ServletOutputStream;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import java.io.IOException;
    import javax.servlet.ServletException;
    import javax.servlet.*;
    //JAXP
    import javax.xml.transform.Transformer;
    import javax.xml.transform.TransformerFactory;
    import javax.xml.transform.Source;
    import javax.xml.transform.Result;
    import javax.xml.transform.stream.StreamSource;
    import javax.xml.transform.sax.SAXResult;
    //FOP
    import org.apache.fop.apps.FOUserAgent;
    import org.apache.fop.apps.Fop;
    import org.apache.fop.apps.FopFactory;
    import org.apache.fop.apps.MimeConstants;
    //passaggio di parametri(da xml a pdf)
    public class generatePDF extends javax.servlet.http.HttpServlet
    public void doGet(HttpServletRequest req,HttpServletResponse response) throws ServletException,IOException
         try {
         File baseDir = new File("xml/");
         baseDir.mkdirs();
    File xmlfile = new File(baseDir, "mail.xml");//file in entrata(stream xml)     
    File xsltfile = new File(baseDir, "carrello.xsl");//file di decodifica xsl
    File pdffile = new File("Testpdf.pdf");//file temporaneo d'appoggio pdf
    FopFactory fopFactory = FopFactory.newInstance();
         FOUserAgent foUserAgent = fopFactory.newFOUserAgent();
    OutputStream outi = new java.io.FileOutputStream(pdffile);
    outi = new java.io.BufferedOutputStream(outi);
    try {
    Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF, foUserAgent, outi);
    TransformerFactory factory = TransformerFactory.newInstance();
    Transformer transformer = factory.newTransformer(new StreamSource(xsltfile));
    transformer.setParameter("versionParam", "2.0");
    Source src = new StreamSource(xmlfile);
              Result res = new SAXResult(fop.getDefaultHandler());
    transformer.transform(src, res);
    } finally {
              response.setContentType("application/pdf");
              response.setHeader("Content-disposition","attachment; filename="+pdffile.getName());
              response.flushBuffer();
              outi.close();
              pdffile.delete();
    } catch (Exception e) {
    e.printStackTrace(System.err);
    System.exit(-1);
    please help my for adjust my code, where is the errors?
    i use tomcat 5.5

    Likely because you are not setting the content length. The rest of the code doesn't look fine however.
    At the bottom of this article you can find a valuable downloadFile() snippet which might give new insights: http://balusc.xs4all.nl/srv/dev-jep-pdf.html
    By the way, please use normal topic titles. You don't need to put pressure. We don't care less if it is urgent or not. That is totally your own problem.

  • Java GUI and runtime().exec help

    I have been working on a GUI that does an assortment of tasks. The final and last task is to make copies of a 3dModel conversion program and a script file that is required to make the converter run and convert. The converter and the script file are moved to a user specified directory. The user specified directory contains all of the models that will be converted. The problem is, I can't get the GUI to boot the converter with the script file. To make the converter work, you need to pass two window's cmd commands but the commands need to occur from the same directory as the converter and script file. This is what I have tried to do:
    String[] commands = new String[]{"cmd ",
    "/c ",
    "cd ",
    smdDirectory.getPath(),
    "skmodel ",
    "model_definition.txt "};
    try{               
    Process child = Runtime.getRuntime().exec(commands);}
    catch(IOException e){}The files have all ready copied to the correct directory. All I need is for the GUI to execute the "skmodel model_definition.txt" commands in the correct directory. What am I doing wrong?
    Thanks for the help in advance.

    String[] commands = new String[]{"cmd ",
    "/c ",
    "skmodel ",
    "model_definition.txt "};
    try{               
    Process child = Runtime.getRuntime().exec(commands, null, smdDirectory.getPath());}
    catch(IOException e){}I will try that and see if I get the desired results.
    EDIT:
    I got it to make. Here is the code.
    String[] commands = new String[]{"cmd ", "/c ", "skmodel",     "model_definition.txt "};
         try{
              Runtime runtime = Runtime.getRuntime();               
              Process child = runtime.exec(commands, null, smdDirectory);
    }Edited by: Euphoria on Sep 28, 2008 9:48 AM

  • I just restored my 13" MBP i5 at the apple store to the newest version of Lion after issues with a previous Time Machine backup from Snow Leopard- this time I created a new account and just ported files and folders, and now MS Office doesn't work. Help?

    I just restored my 13" MBP i5 at the apple store to the newest version of Lion after issues with a previous Time Machine backup from Snow Leopard- this time I created a new account and just ported files and folders, and now MS Office doesn't work.
    ^^ that's the main problem. Here's the full history.
    I bought a new 13" i5 MBP, early 2011 edition. I had an old white Macbook 2.14 ghz core2duo on Snow Leopard. I attempted to port over my time machine backup, but encountered problems in that my User was inaccessible from the new computer after the import finished, and I had to go in and change the root password, etc, and for some reason or another, I couldn't install any programs at all from that administrator's account. By "couldn't" I mean I could install them, but upon installation they would never boot. So, I took it to the apple store and did a clean install from the most up to date Lion OSX. Then, I created a brand new admin account, instead of trying to import the old one, and things seemed great. Then, I just imported my old files from the TM backup, but not any system settings, permissions, or user data. Just my Docs, pics, vids, apps, and itunes stuff.
    Here's where things get weird again. I imported this stuff under the name "old", but all of these folders have a red negative sign on them, marking them as restricted. So, from my main admin account, I cannot even peruse these folders. Since I didn't import user data, I can't sign in to the "old" account to change permissions. I already tried to change the permissions from system preferences, but that didn't change anything. And now, for whatever reason, of all the apps that were imported then, MS Office is the only set of apps that does not work. When I click on it, it just says there was a problem and asks if I'd like to send a report to apple. I tried reinstalling it to no avail. I'm an English student, so i really need access to Word. Can anyone help? The Apple store is a major detour for me and would like to fix this issue myself.

    Most likely you have Office 2004 which are PPC-only applications and will not work in Lion. Upgrade to Office 2011. Other alternatives are:
    Apple's iWork suite (Pages, Numbers, and Keynote.)
    Open Office (Office 2007-like suite compatible with OS X.)
    NeoOffice (similar to Open Office.)
    LibreOffice (a new direction for the Open Office suite.)

Maybe you are looking for

  • Mail issue: not sending (addressed to multiple recipients in BCC

    Hi, I am having trouble sending a message to multiple recipients in the BCC field.  I am sending to myself in the To: box and many others in BCC.  It is not sending the message, either through my Mail program, nor through iCloud mail.  iCloud mail gi

  • SQL - in using a string to filter by numbers

    Hi, Here is my problem, I have a simple query in which I want to include a condition IN using a bind variable. The bind variable is a string that stores numbers delimited by a comma. The query looks like this : select emp_id, ename from emp where emp

  • TS1369 ipod not recognized in my computer or itunes frozen with usb and itunes logo

    My daughter's itouch is frozen with the usb symbol and itunes logo and I have tried EVERYTHING on the apple support site to no avail.  Any suggestions on how to reset it are greatly appreciated!!!

  • Cannot install InDesign on my MAC book pro

    New to Mac, so when I put in the cd, the Adobe folder appearson my desktop, I click on it and select install Adobe InDesign, it opens FTP Client Ultimate to install and of course says cannot install, wrong program.. So I tell it to use Automator, it

  • Corrrect procedure to upgrade

    What is the correct procedure to upgrade from Forms30 to Forms60 ? Is it Forms30 to Form4.5 to Forms60 ? Is there any direct method ? I tried using f60genm, but it only generates the .fmx file not the .fmb file. what I am missing ??