32,199 Topics
| |
Implement the following integer methods: a.Method celsius returns the Celsius equivalent of a Fahrenheit temperature, using the calculation b. C = 5.0 / 9.0 * ( F - 32 ); c. Method fahrenheit returns the Fahrenheit equivalent of a Celsius temperature, using the calculation d. F = 9.0 / 5.0 … | |
I got this program that supposed to display a diamond but I only got the top part of diamond to work. As for bottom part I am not sure what calculation I could use. Any hint would be appreciated! Thanks This is the part: [CODE]//Bottom Part for ( row = … | |
using textpad w/ jdk When trying to use single print line: System.out.println("\n" + var1,"\n" + var2); I get error: symbol : method println(java.lang.String,java.lang.String) location: class java.io.PrintStream System.out.println("\n" + var1,"\n" + var2); I understand that \n is new line, and My instructor told me to just use + "Integer name" for … | |
How would I find the lowest common multiple using basic Java, like loops, etc. | |
Hi, I recently installed jcreator and jdk 1.6 i was testing out the program to see if it worked correctly I used a really simple program(below) but whenever I type a second integer, the error "Make sure you enter an integer" appears, I've tried a few simple programs to the … | |
I'm building a program allows me to answer questions with radio buttons, and then save a list of the questions and the selected answers to a .txt file which I can convert to a .pdf from Word or some other program. Im using a PrintWriter to write the file, and … | |
[CODE] vowels = wordcount.vowelNum(); //counts the vowels consonants = wordcount.consNum(); //counts the consonants, this is not working properly. [/CODE] the consNum() method: [CODE] int length = word.length(); for(int i = 0; i < length; i++){ if(word.charAt(i) == 'a' || word.charAt(i) == 'u'|| word.charAt(i) == 'i'|| word.charAt(i) == 'e'|| word.charAt(i) == … | |
Hello I make java application that read String from text field and convert it to another String it may consider type of encoding . but i want process character by character when user still typing on the the text field. i.e. a-->s ah-->sd ahm-->sdf ahme-->sdfg ahmed-->sdfgh any one can help. … | |
Hi, I am trying to grab frames from a video using JMF. Here is the code i use for getting the frames. Unfortunately, getControl returns null so i get nullpointerexception. [CODE]FrameGrabbingControl frameGrabber = (FrameGrabbingControl)player.getControl("javax.media.control.FrameGrabbingControl"); Buffer buf = frameGrabber.grabFrame();[/CODE] 1) I can open and view the video. So why am i … | |
Hello. I'm just beginning to learn Java and right now I'm working on simple text-based Hangman. But I am having problem replacing unknown letter with correctly guessed letter. (i.e "_ _ _ _" unknown word is roll. User inputs "l", "_ _ _ _" this becomes "_ _ l l") … | |
Hello friends [CODE]String sql = "SELECT * FROM work.cs_book WHERE bookname = ? AND author = ? AND category = ?";[/CODE] I have writtern above query and where i can search for a book based on bookname author and category. I am using preparedStatements to execute query. However something is … | |
ear All, I have java function as below. If you notice this class calls another class that is SMSClient and in that class I have other classes called too. So then I write a php as below and is just call this function and return the results. I want to … | |
the answer to this i found on the web was this: The AWT event dispatcher thread is not a daemon thread. You must explicitly call System.exit to terminate the JVM. and what i understand of it is that the thread which is terminated when we close a JFrame or Applet … | |
Hi all, Im trying to create and write to a file to create a "list" type document that I can convert to .pdf and print out later on. Below is an example of what I'm doing. [I]out[/I] is my file and list in a string array that holds the answers … | |
I have a private message frame of a chat application in which i used a JEditorPane on top of JScrollPane which is used as a conversation pane where both my messages and the messages i receive will be displayed. For this I get the previous text from JEditorPane and append … | |
Hi guys, I'm trying to write a recursive method that checks if the first elements of an array of integers are sorted in ascending order but it didn't work for me !! [CODE] public static Boolean isSorted(int [] a, int n){} [/CODE] I tried to copy elements from array a … | |
Hi, I am currently doing a project on remote object communication between Flex 4.1 SDK and Java using Flerry API.I need a Java program that can capture the user keystrokes while the user enter's text in the action-script text-area. i.e I need Java program that captures the keystrokes as user … | |
Dear All, I have a java application which link to db on another computer on the local lan. The problem I have install jdk_1.6_21 without any problem. Then I have paste mysql-connector-java-5.1.14-bin.jar in /usr/java/jdk1.6.0_21/jre/lib/ext. When I compile my program has no problem when I try to run I get this … | |
Hi all, I am stucked at this problem - net to let user set string as byte eg. "0xFF", And parse it to byte. Problem is, that using... [CODE] byte byteVar = (byte) "0xFF"; [/CODE] ...is incompatible. Nice page about this is [URL="http://www.herongyang.com/Java/Byte-Data-Type-Implicit-Casting.html"]there[/URL]. Any idea how solve this? Thx for … | |
Ok, I have the ever popular Inventory Program in a JAVA class going on. I have successfully created a new class to hold the GUI information. I have the window sized and the title of the window placed. When I run the program the GUI shows up. Next I need … | |
Hi, I'm trying to use the method: Code: [CODE]public static int[] copyOfRange(int[] original, int from, int to);[/CODE] to copy specified values to another array here is my code: [CODE]// I have an array a of integers but the error in this line int [] b = Arrays.copyOfRange(a,0,n);[/CODE] but it gave … | |
So i am sort of stuck with this one, due to the error when compiling, noted in the title. (for uni by the way) But basically the idea is that if your aged between 5 and 18 you get the discount. If your over 18 and below 60 and you … | |
Hello, I have a program that was executed appropriately via windows command line, however when i separated the classes into different packages and tried to compile i got some errors. (No problems executing it via Eclipse. Compilation via command line is the problem) MyFrame.java:19: package Control does not exist import … | |
how to configure junit application context file with struts........? it is not finding sessionfactory method.......... | |
i got a such type of error in junit+struts2 +spring org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'sessionFactory' is defined at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:521) at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1068) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:274) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190) at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1075) at net.action.TestNew.setUp(TestNew.java:45) at junit.framework.TestCase.runBare(TestCase.java:132) at junit.framework.TestResult$1.protect(TestResult.java:110) at junit.framework.TestResult.runProtected(TestResult.java:128) at junit.framework.TestResult.run(TestResult.java:113) at junit.framework.TestCase.run(TestCase.java:124) at junit.framework.TestSuite.runTest(TestSuite.java:243) at junit.framework.TestSuite.run(TestSuite.java:238) at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at … | |
| |
hai, is it possible to loading of tabs in jtabedpane dyanamically in java.. that means i have frame that consinting of one tabbedpane.. in that i have 10 tabs and in each tab consting of another tabbedpane and in that each tabbedpane has 4 tabs and each tab consisting buttons … | |
Hey everyone, I'm using the NetBeans WYSIWYG, the part where you drag and drop to create the windows and buttons ect. What I am trying to do is open a tutorial for my program from a menu item in the 'Help' menu. My problem is HOW to open a window … | |
Hello, and thank you for youre time, I have a problem with my jsp application, when i try to get the values from the html form on the jsp page process.jsp, it sets the values of each element but then does not return them to the java page. It keeps … | |
I just wrote a program that plays various drum sounds when certain keys are pressed. It works for the most part but, when two keys are pressed at the same time, only one sound plays. Both key presses are received, however. I am using the Clip class which allegedly supports … |
The End.