This is a simple program-my question is when you are using control structures such as for loops or switch,do you write the code using the dialog boxes, for some reason I don't automatically think of the dialog box when writing a program-I don't know why I do this, possibly because I learne...
My code is Savepoint savePoint = con.setSavepoint("SAVEPOINT_UPDATE");when this statement is executed. It's throw an exception : java.lang.UnsupportedOperationException sun.jdbc.odbc.JdbcOdbcConnection.setSavepoint(JdbcOdbcConnection.java:1713)do you know why?I'm using Ms Access 2000 datab...
My code :64: stmt2 = con2.createStatement();65: 66: if( stmt2.executeUpdate(query.toString()) > 0 ) 67: {68: query = new StringBuilder();69: query.append(" UPDATE TrJenisSoal ");And its produce root cause javax.servlet.ServletException: General error org.apache.jas...
1621 byte By
rhinomist at 2007-11-20 11:28:59
hey, i haven't written out the code for this yet, but i wrote it out interms of notes and i was just curious if someone wants to look them over and tell me if they think this is correct.requirement:Using the breadthFirstSearch method, implement a method to compute and return a shortest path (in...
2531 byte By
pouncer at 2007-11-20 11:29:12
import java.io.*;import java.net.*;public class Client { public static void main(String[] args) throws IOException { Socket csocket = null; if (args.length != 1) { System.err.println("usage: java Client hostname"); System.exit(1); } String HostName = args[0]; try { csocket =...
1102 byte By
xjairusx at 2007-11-20 11:29:27
Hi guys,Im not sure where to start with this program but here is the specification. If you can help me out it would be appreciated! please include comments! Many thanks in advance if any of you genius's can help me.Here is the spec: Develop a Java program that asks the user to enter a phrase,...
252 byte By
Al86 at 2007-11-20 11:29:39
hello all,<br/>I am using eclipse to write a java program. In the program i am trying to display a string that includes arabic letters but it's not working. Is there an easy way to set the encoding so the program would run properly?.<br/>thank you
basically i am trying to reverse the order of a queue. for instance if i have a queue with 1,2,3,4,5 i would want it to be 5,4,3,2,1. i found how to do it for a linked list and it makes sense using recursion:public void reverse(){ if (head == null || head.next == null) return; Object p = removeFirst...
1876 byte By
renzo2007 at 2007-11-20 11:30:37
Here is the basic code that plays a video as an applet. I have 3 questions about itimport java.applet.*; import java.awt.*; import java.net.*;import javax.media.*; public class PlayerApplet extends Applet implements ControllerListener { Player player = null; public void init() { setLayout...
758 byte By
tech_b_k at 2007-11-20 11:30:42
Hi,My Java Application connects to a Database for fetching records and after processing the records, the Database is again updated.I use JDBC driver connection.An average of 800 Database transactions are done in 5 minutes.The application is working fine when the load is very low. But when the load i...
2395 byte By
hensa22 at 2007-11-20 11:30:47
hi everyoneI found piece of code in the Web,now I am changing this a lot to mebut I need some suggestion about this:it is the code : class ButtonColumn extends AbstractCellEditor implements TableCellRenderer, TableCellEditor, ActionListener { JTable table; JButton renderButton; JButton editButt...
i am using showOptionDialog with OPTION_YES_NO, i want the default focus to be on No button instead of Yes.i tried Object[] options = {"Yes","No"}; (JOptionPane.showOptionDialog(this,"abc","Confirmation",JOptionPane.YES_NO_OPTION,JOptionPane.QUESTION_MESSAGE,null,options,options[1])== JOptionPane....
basically my ToString method to return elements in a queue from first to last does not compile and i cannot figure out why. it came right out of the book i am reading and i have checked everything. any ideas? //-------------- // Returns a string containing the elements of the queue // from...
this book i am reading through gives some code and code skeleton to explain how to use a linked stack. i have filled in all the code correctly...i think except for my push method which will add element to the top of a stack if its not full. it errors with the following:cannot find symbolsymbol : co...
67 byte By
gaurav84 at 2007-11-20 11:33:46
How are web applications packaged for customers in the industry .??
791 byte By
kuku at 2007-11-20 11:33:58
first, some sample code... public void showDataToTable(DefaultTableModel m,int day,int month,int year) { String date=day+"/"+month+"/"+year; String sql = "Select* where Date='"+date+"'"; setQuery(sql); executeSql(); try { while(rs.next()) { Str...
270 byte By
TGL11 at 2007-11-20 11:34:13
im new at Java and im trying to make a program and I need to make a constructor definition that has 2 parameters that will bring in information and in that constructor i need to assign values taken in from the parameters to corresponding fields. can someone help me out
I want to display the MS word contents in IFrame for saving it in database. If anyone knows means, intimate to me
Problem: We have some set of tables that can be modified by anywhere and application doesnt have any control over it. We cache these tables and at a scheduled time we reload these tables. We are not loading tables one by one in the cache because tables are interdependent. We create another instance...
1497 byte By
kuku at 2007-11-20 11:35:17
here is my codepublic void cetakLap() { int y = 0; Frame fr = new Frame(); PrintJob print = fr.getToolkit().getPrintJob(fr, "Printing", null, null); if (print != null) { Graphics g = print.getGraphics(); if (g != null) { headerLap(g); int n = mLap.getRowCount();...
4511 byte By
yukon212 at 2007-11-20 11:36:03
Hi all,I just started programming Java and am having a problem with the current program that I am working on.The objective of the applet:- Display image (150 x 150) in size- Draw rectangle over image- Redraw the selected part within the rectangle(There are also elements to change colors, and resize...
379 byte By
umen at 2007-11-20 11:36:13
Hello all I need to unable web services interface to our already exists corba interface How usually the this done? what I did is :Web services method convert web services data types to corba data types invoke corba method Then in the response I do the opposite.. this is very time c...
1076 byte By
gaurav84 at 2007-11-20 11:36:33
Hi , I am using eclipse for JBoss + Jsp pages + mysql...for a project..when I run the project from eclipse , it deploys a war file , at JBoss_home/server/default/deploy , and the proj runs fine.....now I want to create a ear file of the project , what I did is , I made a j2ee , enterprise applicatio...
Hi Guys,I intend to use the following paging model implemented with the table when handling large amounts of data. http://www.java2s.com/Code/Java/Swing-JFC/AquickapplicationthatdemonstratesthePagingModel.htmThe table shows only 100 entries at a time in the table.The next or previous 100 entries are...
1611 byte By
Graphic at 2007-11-20 11:36:54
First I will ask for your forgiveness if the question I am asking has been asked before. If it has, please kindly point me to the post that explains it. I have looked around other forums and haven't been able to find my answer so I decided to finally ask my question. Second let me explain my si...
345 byte By
Rukuro at 2007-11-20 11:39:02
G'day fellas, With my program, its mainly run from the console window, but when the user chooses to exit I have a GUI popup that is displayed saying goodbye, but the window is displayed behind my console window, is there a setFocus method for a panel or something?Thanks in advance, hope I made...
how can i use RSS FEEDS in java iam developing a site for travel guide like www.yatra.com how can the concept of RSS FEEDS helps me in that aspect please anyone who know about RSS FEEDS please guide me thank u
7022 byte By
Xantom at 2007-11-20 11:40:13
I am trying to get this code example to run properly, I have been looking at this too long and I can't see the problem. I am not seeing where the Jlabel output is being displayed. Also the display Joptionpane is not coming up either. Thanks in advance for any suggestions. below is my code.i...
1763 byte By
benw2007 at 2007-11-20 11:40:17
Hey all, basically im a newbie doin java at the moment...i mean i know a little, but not enough to sit down and work it out (unless i explode)! its crazy, basically all i am trying to do at the moment is to try and write an applet that basically shows 1 label, and 1 text field next to it so the user...
870 byte By
garny at 2007-11-20 11:40:46
what im trying to do is find a (estimated) value for pi...i need to calculate how many interations is done by the program before it starts adding numbers that are too small to be accounted for. im not really sure why i keep getting 0.0 as my pi value. public static float leibnizArctan(float x){ /...
404 byte By
benw2007 at 2007-11-20 11:41:25
Hey all, can anyone help me at all please??basically, all im trying to do is set out a layout that looks good in a java applet...i have made the buttons and the text fields, but they just appear in the NORTH border from left to right...i would like it to be like:Red (text field)Green (text fie...
Does anyone know of a free java gui designer , I just want something to drag and drop swing components. I tried the Jigloo eclipse plugin but it doesn't respond in eclipse 3.2.
3341 byte By
Tkoball at 2007-11-20 11:42:22
Hello,I'm working on a Java problem that has me completely stumped. I've been looking through all the references I can get my eyes on and just can't seem to find what it is that I'm looking for.Basically, the problem I need to write a program for goes like this: Write a program t...
192 byte By
Meg at 2007-11-20 11:43:01
HAVE UNI ASSIGMENT. hAVE SPENT DAY WORKING MULIT-DIMENSIONAL ARRAY. bUT NOW CAN'T GET IT TO ADD TO CITYLIST(DROP DOWN)<br/>HAVE TO SUBMIT MAIL TODAY<br/>I HAVE ATTACHED THE FILE
157 byte By
thrust at 2007-11-20 11:44:45
hi all,<br/>I need help in converting open office to html format using java or xml without using the option "save as".. <br/>please help me out..<br/>thanks
Hi Java Code gurus!!I'm new to Java and would like to know a few things abt Java projects.1. How are JEE projects done in companies in the IT industry??2. What are the SDLC , methodologies, process used for these JEE projects??3. What are the JEE tools and technologies used during the projects...
If anyone is fairly familiar with this problem I would appreciate the help.. My java file as of now reads it a .dat file containing 128 cities with their distances from one another. My goal for this is to be able to first computer a "path" to all cities and back to the original city. This is called...
Please help I need help with this homework.Its about vending machines, and it should be a piece of cake to you code experts out there.Its about vending machines. Heres the question:It should have two classes, one for the vending machine(VM) and the other for drinks. The capacity of the VM is specifi...
i have always assumed that adding and removing to a vector was O(n). i was reading in an article and i am sorry i cannot remember where but it stated that it was possible to add and remove to a vector in O(1). can anyone briefly explain how that is possible?
583 byte By
cases at 2007-11-20 11:46:26
Hello folks,I am looking for suggestions on creating a LinkedList subset method. Any guidance in terms of pseudocode should help me on my merry way. Here is what is being asked, any suggestions would be appreciated!public LinkedList subset (int a, int b);This method receives two integer parameters a...
hi once again iam posting a same query but with a different approach please try to understand and reply me Iam developing a site like yatra.com now how can i share the databases of all the airlines, hotels etc into my website.that means inorder to maintain a site like yatra.com i could be a...
261 byte By
mlotfi at 2007-11-20 11:47:39
Hi,<br/>I read this article :<br/> http://www.developer.com/java/ejb/article.php/10931_3321521_2<br/>but can't download the struts.war file at the end of the page, it ask for a username and password.<br/>Please your help is appreciated.<br/>Thanks
I have a JTree which has parent and child nodes. When i add a child node to a parent node the node is getting added. I want to retrieve the parent node of this child node. Its like every parent node has an id associated with it in the database. now when a child node gets added to its parent i need...
47 byte By
Dusker at 2007-11-20 11:49:27
solved my own problem.. apologize for this post
300 byte By
prasun at 2007-11-20 11:49:52
class Excep{<br/> public static void main(String[]args){<br/> try{<br/> }catch(InterruptedException e){}<br/> }<br/>}<br/>The above program fail to compile but when i change InterruptedException to Exception then it will compile.Why?...
I need an example Java application with UI which works under 3 tier architecture. I need to send data from the UI form and retreive as well.Importantly getting values to JComboBox from database shud be there.i'll be thankful if someone post a good example regarding my needs.thanks...
1086 byte By
sepahs at 2007-11-20 11:51:20
I think I've messed up the Strings/Boolean functions, but im not sure how to fix it. Any help would be appreciated. public class Parks { private String[] parkingBays; private int numCars; public Parks(int capacity) { parkingBays = new String[numCars]; for (int i = 0; i &l...
This is the object I created public Profile getProfile(String userName) {Profile profile = new Profile();School[] school = null;String query = "SELECT ...";stmt.execute(query);if(rs.next()){school = getSchool(person.getPersonId());profile.setSchool(school);}return profile;I am trying to retrieve the...
1038 byte By
pouncer at 2007-11-20 11:51:39
private static class PeerConnection extends Thread { String hostname = null; public PeerConnection(String host) throws IOException { hostname = host; } public void run () { try { SocketChannel csocket = SocketChannel.open(); csocket.configureBlocking(false); csocket.connect(new InetSo...
184 byte By
kuku at 2007-11-20 11:52:28
/init<br/>public double Error=0.0;<br/>.<br/>.<br/>.<br/>/looping<br/>this.Error += Math.abs(instantError);<br/>"Error" value using System.out.print()=NaN<br/>what does that mean?