Why java is not mostly used to develop desktop application

Why java is not mostly used to develop desktop application & how to connect with oracle using java
[116 byte] By [punit_kumar] at [2007-11-25 20:11:36]
# 1

Java makes use of Swing libraries to bring the GUI on screen. Though the Swing has evolved quite a bit, it still has issues and not stable during sophisticated uses and with screens where large and complex GUI (for eg., TabPanes with lot of input fields in each button) has to be built. Managing focus on each and every individual fields and managing the events, though available directly, are not very user friendly as such... It would take quite sometime before someone could effectively manage the events around a Swing component, placed on a screen.

To answer the other part of the question, connection with Oracle, you should make use of one of the four types of JDBC drivers available for that purpose. JDK comes with JDBC-ODBC bridge and consult the documentation for java.sql classes for further details.

Hope this is of some help...

Good luck...!!!

HelloFromKovai at 2007-7-4 14:43:29 > top of Java-index,Desktop,Sun Java Desktop System...
# 2

Since other tools are available for developing the desktop applications which are quite light in wight and probably much easier that swing to organize, it is used very rarely.

to answer ur next question i.e how to connect to the oracle, i hope followig the below steps will do much work for u.

1) create a database in oracle with a table in it.

2) control panel->admin toos->ODBC

3)there u select to add button to add a new connectiont to the database.

4)then in the wizard, u r required to select the proper type of the database.so select oracle from the list

5)in this step, u must provide with a name to use as a url string in ur java program i.e provide any suitable name to the connection

6)click on "select...." to select u respective database and click ok

having done this, establish connection via program by using jsbc api.

hope the above steps will solve ur problem.

faisal_dynamic at 2007-7-4 14:43:29 > top of Java-index,Desktop,Sun Java Desktop System...
# 3

I'm new to java.

I tried to develop an java application to connet to sql sever database through jdbc odbc bridgh. it works properly.

my table is like this

fields

**** ID

**** Name

now i need to put "ID"s into a ComboBox. and once I select a "ID" perticular "Name" should be appearred in a Lable or TextField.

Plese help me. If some one can give standerd java cording gratly apreciate.

Thank You.

Chami at 2007-7-4 14:43:29 > top of Java-index,Desktop,Sun Java Desktop System...
# 4

Put objects like the following in your combobox:

[code]

public class NameRecord {

public String id;

public String name;

public NameRecord(String id, String name) {

this.id = id;

this.name = name;

}

public String toString() {

return name;

}

}

[code]

The toString causes the nice label.

You fetch the selected object, cast it to NameRecord and fetch the ID.

joop_eggen at 2007-7-4 14:43:29 > top of Java-index,Desktop,Sun Java Desktop System...