32,205 Topics
| |
i am having a problem to write the code for a project that i have i need to get the label to the picture attached to count how many oval and rectangle are in the picture i have the code for the rest i just cant figure how to arrange … | |
I compiled this program with no error, but when I run it give me some kind of problem where I have: idNumber = inFile.nextInt(); //student ID number. Appreciate any help. Thanks [CODE] /* *Description: Writing own method, Switch Selection Control, String,Accumulating, *Counting method, array base on last reviews from previous … | |
What are the drawing functions in Java If possible explanation of these functions:icon_rolleyes: | |
consider a instance jtextfield t=new jtextfield(); jtextfield t1=new jtextfield(); jtextfield t2=new jtextfield(); i want to get the values of textfield t and t1 and display in t2 like i want to add values of t and t1 and store in t2 | |
Hi, I have checked examples and tutorials but never seem to get a direct answer to a couple of questions. When using a Gui with a JButton (Netbeans)where does the code for the array go in order to be displayed? Here is the code for the array and I just … | |
I want to create a file by entering its name at runtime through command line argument..But i am not getting any idea about how to do that?? Please provide some help.. THANKS | |
import java.lang.reflect.*; import java.awt.*; import java.lang.*; class SampleField { public static void getField(Class c) { //Class c= Class.forName(s); Field f[]=c.getFields(); for(int i=0;i<f.length;i++) { System.out.println(" "); Class type=f[i].getType(); System.out.print(type.getName()); System.out.print(""+f[i].getName()); } } public static void main(String... s1) { try{ Class c= Class.forName(s1[0]); getField(c); }catch(Exception e){System.out.println(e);} } } I have written the … | |
[COLOR="red"]when i tried to register the remote object with rmi registry i got following[/COLOR]: J:\prgs\my>start rmiregistry J:\prgs\my>java -classpath .. my.Register java.rmi.ServerException: RemoteException occurred in server thread; nested exce ption is: java.rmi.UnmarshalException: error unmarshalling arguments; nested excep tion is: java.lang.ClassNotFoundException: my.MyServer_Stub ---------------------------------------------------------------------------------- [COLOR="red"]here is the code of Register.java[/COLOR] [CODE]package my; import … | |
[CODE]import javax.swing.*; import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; public abstract class login extends JFrame implements ActionListener { public static void main(String[] args) { JTextField firstField = new JTextField(10); JPasswordField middleField = new JPasswordField(10); JButton b1=new JButton("ok"); JLabel firstLabel = new JLabel("username", JLabel.RIGHT); firstLabel.setDisplayedMnemonic('F'); firstLabel.setLabelFor(firstField); JLabel middleLabel = new JLabel("password", JLabel.RIGHT); … | |
hey, i have been working on my final year project, the program is finished and now i have do the testing. i have finished black box testing but i have no clue how to do white box testing. i have looked around the web but there is only definition of … | |
What is the difference between an abstract class and an interface?give me an example? | |
Is there a way to create a program to rewrite a query in an optimal form. If so, how? I already connected MYSQL to Java. I just need ideas on how to implement it. Thanks. Rewrite: SELECT EMPOYEE.EMPNO, POSITION FROM EMPLOYEE E, JOBHISTORY J WHERE E.EMPNO = J.EMPNO AND STARTDATE … | |
I found a link to javadoc for JXSE 2.7 from [url]http://jxse.kenai.com/Tutorials/Tutorials.html[/url] which provides a link to javadoc on kenai.com but either the link is broken or the java doc is moved elsewhere. If anyone know working link to JXSE 2.6 or 2.7 please let me. Thanks | |
NOTHING HAPPENS AFTER EXECUTING THIS CODE, BUT IT COMPILES AND RUNS SUCCESSFULLY [code]import java.io.IOException; public class Runx { public static void main(String args[]) { try { String x="cmd /c dir"; Process p=Runtime.getRuntime().exec(x); } catch(IOException e) { e.printStackTrace(); } } }[/code] Please help....................... | |
Hey; I'm trying to do a hang man game in Java. I newly learned some stuff about programming some GUI using Swing and AWT, but I'm not still clear with it. The problem is that all the drawing is done by a single function paintComponent() from the JPanel that I … | |
steps 1.I create a java project. 2.in the same java project i ll create a main class(say sample). 3.i ll call a function(say sample_function()) inside main class. question is: where should i implement the function(sample_function()) i.e should i have to create a new class in the same project or i … | |
Seem tangle myself up with coding here and couldn't solve much of problem after many long try. I need your fresh set of eyes. Below is my errors. Thanx /* *Description: Writing own method, Switch Selection Control, String,Accumulating, *Counting method, array base on last reviews from previous labs. *prepare a … | |
Hey I have a question about running an application that uses a .jar file. If I have a file outside called Tester.java that uses a jar file, let's call it myJar.jar, and let's say the classes are packaged as myPackage.myClasses. I imported all the classes I needed using [code] import … | |
After following above program i still have tons of error on my list what step i could have missed... I really need to get it to work before i could start on my project... [url]http://integratingstuff.com/2010/10/18/writing-code-that-captures-videos-on-android/[/url] | |
Sorry if this is posted in the wrong section. But I came across this question on a test: Which of the following will evaluate to true only if boolean expressions A, B, and C are all false? (a) !A && !(B && !C) (b) !A || !B || !C (c) … | |
Hi my problem is that i'm making a mobile app and i need to seperate the following string: ChrisHunter21 into: Chris Hunter 21 What is the easiest way to do this in J2ME ? i had a look at the Ostermiller one but didnt understand it. Thanks Chris | |
I've tried many time to solve this problem...but still not successful, I'm newbie..so anyone of guys can help me check this problem... [LIST] [*]Button "Back" is big as frame [*]Seems no TextField for NoOfTicket [/LIST] [CODE]import javax.swing.*; import java.awt.*; //import java.awt.event.*; public class ticketReservation extends JFrame { private JLabel jlbWelcome, … | |
Hello, i have a class "Die" and a class "PairOfDice" pair of dice extends die. i need to instance variables of type die in pairofdice constructor... i think. here are constructors for die and pairofdie.. we learned all of this earlier this semester but apparently i didn't learn it well … | |
| Edit: Never mind I figured it out. I used Math.pow(base, exponent) to figure it out I'm creating a calculator and I can figure out how to the power of two doubles. This is what I have: [CODE] public Power(Double base, Double exponent) { result = base ^ exponent; //result is … |
I know this is a very common program that has been discussed, and I have searched through all the previous posts about it but still having problems. It's a program for an airline seating reservation. Consists of 12 seats total, 1-4 is First Class, and 5-12 is Economy. I have … | |
My assignment: develop a limited application to track the statistics of sports players. For each player, track first and last name, points scored, assists made, and penalty rate. Design and implement an object capable of recording this info. Implement this object as Player. Must allow user to enter new player … | |
i have an error of line 40 illegal start of expression and line 73 class interface,or enum expected. im making a 10 random numbers display them determine the largest and the smallest number of 10 random numbers thanks.. [CODE]import java.util.Random; /** Generate random integers in a certain range. */ public … | |
I have to create a Pizza GUI that shows pizza size choices and topping choices for pepperoni and mushrooms and then calculate the total. I'm having trouble constructing the GUI. Down in the createCenterPanel method Eclipse is tell me that radioButtonPanel, checkBoxPanel, and pricePanel cannot be resolved to a type. … | |
[B][COLOR="Red"]final[/COLOR][/B] members are used to specify that it can not be [I]revalued[/I] or [I]overriden[/I]. :icon_lol: [U]Explain [B]logically,[/B] [I]why[/I][/U] a [B][COLOR="Green"]static[/COLOR][/B] method can not [B][I]override[/I][/B] comparing it with an [I]instance method[/I]. May a [B][COLOR="Green"]static[/COLOR][/B] variable be [B][I]revalued[/I][/B]? :icon_exclaim: If, [B][COLOR="Green"]static[/COLOR][/B] also serves the same purpose at this point as [B][COLOR="Red"]final[/COLOR][/B], then … | |
Hi , I have a problem. I am inserting 5 rows into a table. Before inserting i disabled the auto commit(conn.setAutoCommit(false)). And after i have not at all commited the transaction. And i used rollback for every exception in catch block. But, The transactions are saving up to the exception. … |
The End.