32,199 Topics
| |
I'm dying here! So far you guys have been way more help than my instructor who speaks Russian or something. Any advice will be more than helpful. This is my issue... Use the random class once for each die, the sum of the two values should then be calculated. Each … | |
can some1 give me an example of sorting and merging an 10 inputted integers?!using java array.. | |
I TRIED IT A LOT i used "getFrame().setSize(x,y)" in netbeans to set size of my frameview object in netbeans.....but it's not working. please help me | |
Hi, am using MyEclipse. The tutorial is on Hibernate & Spring ... [code] Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory at org.springframework.beans.factory.support.AbstractBeanFactory.<init>(AbstractBeanFactory.java:94) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.<init>(AbstractAutowireCapableBeanFactory.java:109) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.<init>(AbstractAutowireCapableBeanFactory.java:118) at org.springframework.beans.factory.support.DefaultListableBeanFactory.<init>(DefaultListableBeanFactory.java:87) at org.springframework.beans.factory.xml.XmlBeanFactory.<init>(XmlBeanFactory.java:72) at org.springframework.beans.factory.xml.XmlBeanFactory.<init>(XmlBeanFactory.java:61) at com.myeclipse.hibernatespring.BusinessLogic.main(BusinessLogic.java:23) [/code] I do have the commons-loggin.jar added to the Java Build Path ... My class ... [code] … | |
hey Guys im using this bubble sort to sort an arraylist out but cant seem to output the sorted data out properly! Is there a return method i can use? Damn ive been stuck hours on this one... Anyone that could guide me to a solution would be great. Note: … | |
class t{ Somebody please help me with one very simple program in java. I'm new to java, so I can't understand what all this errors about. Please help me fix this program. It gives three errors: illegal start of type swith (s) orphaned case case 'Y': <identifier> expected switch (s); … | |
import java.util.*; class Degree2 { Scanner in() { return new Scanner(System.in); } void out(String m) { System.out.print(m); } double readDouble(String m) { out(m); return in().nextDouble(); } String readString(String m) { out(m); return in().nextLine(); } void foundRoot(double a,double b,double c) { if(a==0) out("Value x is: "+(-c/b)+"\n"); else { double data=(b*b)-(4*a*c); if(data>=0) … | |
[code=java] import java.util.*; public class Convert { Scanner in() { return new Scanner(System.in); } void out(String m) { System.out.print(m); } long readLong(String m) { out(m); return in().nextLong(); } int readInt(String m) { out(m); return in().nextInt(); } String readString(String m) { out(m); return in().nextLine(); } String digitOne(int n) { String st=""; … | |
This is what I am trying to do... I have a image and I create a bufferedImage and graphics out of that using: [CODE=java] BufferedImage img = ImageIO.read(file); Graphics2D g = img.createGraphics(); [/CODE] Now I play with the graphics and finally save the file using: [CODE=java] File outputfile = new … | |
am begin you people help send the available links or books to my mail. i wont to become a java programmer, but is been a long time have been reading so many book without any good understanding of the language called java. i also interested in been certify. please any … | |
Hi all, I'm currently learning Java right now through a class and my instructor has asked me to try writing a word-count program using a Map interface. It should run through command line and has to identify the number of words, the number of distinct words, and the distinct words … | |
Hey guys do you have any samples that uses hashtable in multi part form to insert image and information into database. In the jsp form, there is some codes regarding on hashtable that is input into by my tutor. However, I do not understand about it. My tutor taught me … | |
hello all, I am trying to create a class for an inventory program that will store certain values like name, item number number of units and price. I have written a code but it is apparently not correct because I get several error messages. can you please look at what … | |
Hi, I am trying to print a String value like this but still not able to get it,. my method is like this:- [CODE] Class1 { public String mystring; public void mymethod(){ mystring = ""; } //Then I am setting the value of mystring in other method like this:- public … | |
Hey guys, I was having a bit of trouble with making my GUI look presentable (not too busy or crammed up) and I have a few questions that shouldn't be too hard to answer. I'll briefly explain what I have at the moment. I have a total of 15 text … | |
Question - Three stacks can be used to sort a list of numbers. Assuming stack in holds the input list of numbers, stack out is to hold the output list after sorting the numbers and temp is used during the sorting process. The sorting algorithm follows. 1 set up stack … | |
please help me in writing a program in java "A student has a name,roll no., class, home address, date of birth. First dessigne a suitable class for date, write constructor and get and set functions. Then dissign a class for students informations. Write constructor, get and set function to calculate … | |
When i write like This: [CODE]JTextArea area=new JTextArea(); [/CODE] then i can do this :[CODE] area.append("");[/CODE] But when i write this : [CODE]JTextPane area=new JTextPane(); [/CODE] Then i can not write [CODE] area.append("");[/CODE] so what is equal append() method when i use JTextPane???? thanks in advance | |
Hi all, i'm trying to get a specific line in a text from a text file. In fact i want to read just the eight first line from my text file. It's only return the four first line. why? here is my code but, there is Format problem. [CODE]import java.io.*; … | |
hi, Im just wondering on how I could get a columns and a record count I mean the whole thing in a database aside from executing this statement [icode] "select count(*) from myDatabase" [/icode]...is there another statement that i can use instead of this one coz it doesnt retrieve any … | |
[code] import java.util.*; class Salon { static Scanner sc = new Scanner(System.in); public static void main (String[] args) { int skinType,option,maskType,massageType; System.out.println ("\t\t*********************"); System.out.println ("\r Welcome to Sally Salon"); System.out.println ("\r Services available:"); System.out.println ("\r 1.facial and massage"); System.out.println ("\r 2.facial only"); System.out.println ("\r 3.massage only"); System.out.println ("\t\t*********************"); System.out.println ("\t … | |
Hi, I'm having a page like below : [code=jsp]<html><head><body> <FONT COLOR=RED SIZE=5> <%@page import ="com.ui.CTransactionManager"%> <%@page import ="com.ui.CUser"%> <% String UserId = request.getParameter("UserId"); CTransactionManager objmanager = new CTransactionManager(); CUser user = objmanager.getUser(UserId); String m_staff_id = user.getStaffId(); out.print( "Staff Id : " +m_staff_id ); %> </font></body></head></html>[/code] here i want to pass … | |
hello, can u pls help me sir about my problem in the level order travelsal?... i did trace my code and i found no wrong. but when i compile it, there's something wrong in it and i dont know where... thank u very much! [code] int count = 1; public … | |
Hey Guys, I have a form that allows for additional rows to be added based on the number of serials being entered however I have just noticed that it cuts off at 9 rows and starts to repost the first 9 rows again for anything past that and i can … | |
hello, what is java spring? i read its a framework. but what compiler do i use to work with it? and from where i can download java spring? i tried this page [url]http://www.roseindia.net/spring/springdownload.shtml[/url] but their explanation, i dont find the things they put. | |
hi, i m very new here and also in programming world. i tried to make a program that prints happy and unhappy numbers. but that prints only unhappy numbers and then it goes back to while loop where j remain 0. how can i fix the problem? plz someone help … | |
Itry to move text in tTextarea to left or to center or to right by pressing to buttons i did like this but unfortuantly it is not work . [CODE] public void actionPerformed(ActionEvent e) { if(e.getSource()==buttons[0]){ area.setComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT); } if(e.getSource()==buttons[2]){ area.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); } } [/CODE] area if an object from JTextArea can … | |
I'm working on a project in which i have to use J2ME. I've tried a few tutorials but they seem only to be especially oriented to specific problems, and in my programming experience i've learned that's always better to globally know your environment. If anyone knows an e-book (or book) … | |
Hi, I am very new to Java and am using Breezy Swing. I basically need to create an array of JButtons (26 in total) and display them on a form (9 on the top row, 9 in the middle and 8 on the bottom) and I have no idea of … | |
Good Day, I am using an Ms Access Database to design a StockTracker applicaton. The application is used to check the stocks of users. Firstly I need to sign on as an administrator and then be able to add users and their stocks to the database. I have created the … |
The End.