Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Java vs Oracle Forms

Re: Java vs Oracle Forms

From: C. Ferguson <c_ferguson_at_rationalconcepts.com>
Date: Sat, 12 Feb 2000 18:51:07 GMT
Message-ID: <38A5ABAD.1F7299A5@rationalconcepts.com>


Hmmm,
  it sounds like your developers are newbies to java.

  you too, and I mean no offense.

  The code you wrote for the form is analogous to the code being written for the ActionListener.
  I'm going to assume that your business level logic was in that form's code.

  so, in java, one example....

  public class mytest exnends JPanel implements ActionListener {

         private JButton b1;
         private JButton b2;
         private JButton b3;

         // Constructor
         public mytest () {

           // Build your gui
            .....
            ....

// Create your buttons.
b1 = new JButton("Ok");
// Mechanism to listen for your business logic, note, it's just
one line of code. b1.addActionListener(this); b2 = new JButton("Cancel"); b2.addActionListener(this); .... .... b2 = new JButton("Generate Report"); b2.addActionListener(this); ... ... } // End constructor // ActionListener for this class...your business logic container. public void actionPerformed(ActionEvent e) { // Determine which button was pressed. JButton source = (JButton)e.getSource(); // Ok for a small number of buttons, there are other ways to do this... if (source == b1) {
// your business logic
} else if (source == b2) {
// you other business logic
} else {
// b3 logic
} }// End action listener

  } // End class mytest

 So, to generate the gui portion, you could be using one of the many IDE's out (Check out the JavaSoft web site, the Swing area. They used to do evals on the different IDEs) (I'm not a fan of the IDE's but I'm very comfortable in the language.)

 Then you can concentrate on the business logic of the code (the actionPerformed method).

 cheers,
cindy

coakleyj_at_hotmail.com wrote:

> Hi all.
>
> I have a team currently developing a GUI front-end using JAVA.
>
> Now, it seems very complex. For example, all buttons must have listener
> events for each action on each button.
>
> Now, I have been programming Oracle Forms for a number of years, and it
> was nothing near as complex as this. All I had to do was write the code
> for the event, and not worry about listening for the event.
>
> Was the Oracle Forms runtime environment providing this functionality
> for me in the background?
> If so, are there any tools on the market that provide this "container"
> or supporting functionality for Java, so as to allow developers
> concentrate on the more business-level functionality?
>
> Can these tools be downloaded as part of an applet?
>
> Thanks
>
> Coakleyj
>
> Sent via Deja.com http://www.deja.com/

> Before you buy.

Received on Sat Feb 12 2000 - 12:51:07 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US