32,204 Topics

Member Avatar for
Member Avatar for Neversleepin

Hi, i'm trying to create a "Save as" frame with my small program. It must open a Save As windows where i could choose the name of the file (txt) that i want to save. Is there any method to do this? i didn't find with google. Thanx

Member Avatar for Neversleepin
0
844
Member Avatar for jsefraijeen

Define a method hypotenuse that calculates the length of the hypotenuse of a right triangle when the lengths of the other two sides are given. (Use the sample data in the table below) The method should take two arguments of type double and return the hypotenuse as a double. Incorporate …

Member Avatar for bibiki
0
3K
Member Avatar for u_v

create a Report of Customers and my database are MicroSoft Access 2000 Coding are Following Plz somebody hlp me in my project [code=java]import javax.swing.*; import java.awt.*; import java.awt.event.*; public class FrmCustomerReport extends JDialog{ public static JTable JTExpTable; //Start create variables JButton JBSearch = new JButton("Print",new ImageIcon("images/print.png")); JLabel JLPic1 = new …

Member Avatar for Akill10
0
108
Member Avatar for kitt_simple

How do I make Two frames? when frame1 is open the frame2 is hide,and when frame2 is open the frame1 is hide?

Member Avatar for Akill10
0
92
Member Avatar for prem2

Dear all, Scope resoultion operator is used to call the properties or methods of the class. Properties : =========== Variables Constants Why scope resoultion operator cannot be used for non-static variables . Can any one help me out . Thank you, With Regards, Prem

Member Avatar for Akill10
0
149
Member Avatar for jsefraijeen

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 …

Member Avatar for masijade
0
909
Member Avatar for smcr01

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 = …

Member Avatar for masijade
0
131
Member Avatar for alonewolf23

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 …

Member Avatar for alonewolf23
0
19K
Member Avatar for Feriscool
Member Avatar for pbl
0
84
Member Avatar for tedelston

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 …

Member Avatar for tedelston
0
259
Member Avatar for scottdurica

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 …

Member Avatar for mcriscolo
0
732
Member Avatar for plasticfood

[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) == …

Member Avatar for plasticfood
0
100
Member Avatar for AhmedGhazey

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. …

Member Avatar for AhmedGhazey
0
86
Member Avatar for earwax

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 …

0
53
Member Avatar for tozymba

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") …

0
51
Member Avatar for nitins60

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 …

Member Avatar for majestic0110
0
117
Member Avatar for newbie14

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 …

Member Avatar for newbie14
0
357
Member Avatar for ronnieaka

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 …

Member Avatar for JamesCherrill
0
561
Member Avatar for scottdurica

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 …

Member Avatar for scottdurica
0
203
Member Avatar for warlord902

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 …

Member Avatar for JamesCherrill
0
222
Member Avatar for matrixcool

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 …

Member Avatar for JamesCherrill
0
187
Member Avatar for VichuTheWizard

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 …

Member Avatar for VichuTheWizard
0
194
Member Avatar for newbie14

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 …

Member Avatar for newbie14
0
251
Member Avatar for RossR

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 …

Member Avatar for javinpaul
0
235
Member Avatar for justin3085

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 …

Member Avatar for Akill10
0
102
Member Avatar for matrixcool

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 …

Member Avatar for Akill10
0
124
Member Avatar for crazy8

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 …

Member Avatar for JamesCherrill
0
104
Member Avatar for Statoeo

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 …

Member Avatar for Statoeo
0
117
Member Avatar for deepakjainmit

how to configure junit application context file with struts........? it is not finding sessionfactory method..........

Member Avatar for ~s.o.s~
0
81
Member Avatar for skekre88

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 …

Member Avatar for ~s.o.s~
0
294

The End.