32,204 Topics

Member Avatar for
Member Avatar for 24x24

I wasn't sure if this should go in games development or here but it's java so I put it here. This is homework so please don't write my code for me. My assignment is to create a game. It has to have moving parts, keyboard controls, buttons, the works. I …

Member Avatar for 24x24
0
383
Member Avatar for luisthedude

I'm trying to launch an .exe from a JButton on a java Jframe, any1 knows how to make it execute. [CODE]private void OKButton3ActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your handling code here: } [/CODE]

Member Avatar for harinath_2007
0
112
Member Avatar for harinath_2007

Hello.. I am in search of how to play a video in full screen mode using java. I know how to play a video using the JMF. but i want to play the video in full screen desktop java applicaton .. Any solution....?

0
58
Member Avatar for saurabh2007

I am running into an error with NoSuchElementException, Please help! Here is the error: Exception in thread "main" java.util.NoSuchElementException at java.util.Scanner.throwFor(Scanner.java:838) at java.util.Scanner.next(Scanner.java:1461) at java.util.Scanner.nextInt(Scanner.java:2091) at java.util.Scanner.nextInt(Scanner.java:2050) at Project.answerKey(Project.java:292) at Project.findMyAvg(Project.java:344) at Project.printMyResults(Project.java:269) at Project.printHeader(Project.java:203) at Project.main(Project.java:30) The code at line 292 is: [CODE]answer[count] = inScan.nextInt();[/CODE] the method is: [CODE] …

Member Avatar for NormR1
0
513
Member Avatar for gomonkeyninja

Hi, I'm a beginner with Java and I need help with an assignment: Write a program that will help the Toronto Blue Jay's scouts decide which players they should draft next year. For each player the scouts have been watching, a record has been prepared showing the player's name, age, …

Member Avatar for bibiki
0
369
Member Avatar for hueikar

Hi, i am currently doing a system for the rental video. I am new to java coding.. Problem is how to add data to access database using java coding in method? Thank you.

Member Avatar for hueikar
0
149
Member Avatar for pi_lord12

Hey guys, I'm working on a project to use Huffman trees to compress a text file into binary. For instance, based on the frequency of the characters in a string like "aardvark", a - 3 r - 2 d - 1 v - 1 k - 1, compression using a …

Member Avatar for pi_lord12
0
217
Member Avatar for sirlink99

How would I go about using swing components and graphics in the same program. Whenever I seem to add a swing component my graphics disappear. Please help. Thanks. My main Class [CODE] import java.awt.*; import java.awt.event.*; import javax.swing.*; public class ResistorColorCodeProgram implements MouseMotionListener, MouseListener, KeyListener{ public ResistorColorCodeProgram (){ JFrame resistorCCFrame …

Member Avatar for mKorbel
0
200
Member Avatar for abhi10kumar

I am populating combobox on checkbox checked or not click event. Here is code. I am not solving the bug, JS runs on chrome but not in both IE and Firefox. checkbox <input type="checkbox" onclick="selectinactivebatch(this.value);" id="inactive_batch" name="inactive_batch" <?php if(isset($_POST)) echo "checked";?>> AJAX Code function selectinactivebatch(checkboxvalue) { var check; if(checkboxvalue=='on') check=1; …

Member Avatar for twiss
0
377
Member Avatar for winecoding

I am using Eclipse to develop an applet module, which requires a bunch of libraries. It runs correctly under the Eclipse environment. I would like to know how to embedded this code in a html page, or how to deploy this applet?

Member Avatar for NormR1
0
78
Member Avatar for winecoding

I am implementing an applet module which receiving an object sent from a servlet. The following is used to setup connection. [CODE]private URLConnection getServletConnection(String hostName) throws MalformedURLException, IOException { URL urlServlet = new URL(hostName); URLConnection con = urlServlet.openConnection(); con.setDoInput(true); con.setDoOutput(true); con.setUseCaches(false); con.setRequestProperty("Content-Type","application/x-java-serialized-object"); return con; } [/CODE] The following is the …

Member Avatar for NormR1
0
163
Member Avatar for s.w.a

hello, please i make a code that i want it to work as follows: the user input 3 value and after an inspection(that i am not put it now, i want to try it now so i make the condition, if k%2==0)the input is be either spoof or valed,at the …

Member Avatar for s.w.a
0
196
Member Avatar for omlac

Hi all, Does anyone know what might be causing this error message when i try to send a SOAP Request. java.security.PrivilegedActionException: com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: Invalid Content-Type:text/html. Is this an error message instead of a SOAP response? Regards

Member Avatar for omlac
0
118
Member Avatar for adarshcu

[CODE]import java.util.regex.Matcher; import java.util.regex.Pattern; public class RegexTest { public static void main(String[] args) { String regex = "([a-zA-Z'-]*[ ]*)*"; Pattern p = Pattern.compile(regex); String input = "Adarsh has been testing this issue for a very long time now!#!"; Matcher m = p.matcher(input); System.out.println("Called"); if(m.matches()) System.out.println("Matched"); else System.out.println("Not Matched"); if(input.matches(regex)) System.out.println("Matched"); …

Member Avatar for thekashyap
0
183
Member Avatar for pankajagar2002

Hi, I want to avoid the addition of the <tr> tag when i am rendering the following code in struts2. [code]<s:textfield name="students[#stat.index].lastName" /> <s:textfield name="students[#stat.index].firstName" /> <s:textfield name="students[#stat.index].userName" /> <s:textfield name="students[#stat.index].userPassword" />[/code] textfield tag will add <tr> tag before each row. I want to avoid the addition of this tr …

Member Avatar for javaAddict
0
100
Member Avatar for Usmaan

Hi Forum, I'm currently working on a project where I create a form in Javascript/HTMl(easy). By form, i mean an actual form where it shall contain combo boxes, drop-down lists, buttons etc. Something like a questionnaire. That's all good and simple enough. However, how can I use this questionnaire/form to …

Member Avatar for roswell1329
0
95
Member Avatar for Dean_Grobler

Hi there, I've recently been given a project that I have to develop portlets for Liferay portal. I have absolutely no experience with portlets, although I do have experience with servlets. Portlets and Servlets have quite alot in common, but I honestly don't even know where to start. I've got …

Member Avatar for Ezzaral
0
117
Member Avatar for winecoding

In servlet side, I am trying to receive an vector sent from the applet. The code is like [CODE]InputStream in = request.getInputStream(); ObjectInputStream inputFromApplet = new ObjectInputStream(in); Vector v = (Vector)inputFromApplet.readObject(); [/CODE] But the compiler specifies that the following one is wrong. [CODE]Vector v = (Vector)inputFromApplet.readObject(); [/CODE] The error message …

Member Avatar for JamesCherrill
0
144
Member Avatar for tboz203

I've had an idea for a class that, instead of storing a number as a single floating-point value, stores the exact value as two or more integers (in cases such as division, fractional exponents, or irrational numbers such as pi or e). The class would have it's own mathematical functions …

Member Avatar for JamesCherrill
0
187
Member Avatar for bulger2503

Is there a way to add data into a RandomAccessFile using seek(long) without writing over the data at that position and beyond? For example: [code] public static void main(String[] args) throws Exception { RandomAccessFile raf = new RandomAccessFile("test.txt", "rw"); raf.writeBytes("Hello, World!"); seek(2); raf.writeBytes("Goodbye, World!"); raf.close(); } [/code] Using that the …

Member Avatar for JamesCherrill
0
104
Member Avatar for omlac

How do i send a Soap request like the one below in Java.Links to SOAP for newbies will be much appreciated as well. [code=xml]<SOAP-ENV:Envelopexmlns:SOAP-ENV="http://www.w3.org/2001/12/soap-envelope"SOAP-ENV:encodingStyle="http://www.w3.org/2001/12/soap-encoding"> <SOAP-ENV:Body xmlns:m="http://www.xyz.org/quotations"> <m:GetQuotation> <m:QuotationsName>MiscroSoft</m:QuotationsName> </m:GetQuotation> </SOAP-ENV:Body></SOAP-ENV:Envelope>[/code]

0
64
Member Avatar for caierhui

How do i restrict access to other JFrame? if i open my main frame and click the add button, the user will not be able to go back to the main frame. how do i do that?

Member Avatar for mKorbel
0
144
Member Avatar for maii_18

Hello, I want to know how can I call VB.NET (Server Side) function to Javascript (Client Side). I want to insert function here in my Javascript code; [CODE]function ConfirmSave() { var Ok = confirm('Proceed to Save?'); if(Ok==true) return true; else if(Ok!=true) return false; }[/CODE]I want to exefcute the Save() function …

Member Avatar for twiss
0
355
Member Avatar for Circaea

Hey guys, I just found out that I'm a semifinalist in Google International Online Science Fair! Thats top 60 out of like 7,500 projects. Right now theres a People's Choice award contest on, with the reward being a $10K scholarship! Can I get some votes from you guys? Just takes …

Member Avatar for Ancient Dragon
5
248
Member Avatar for lovelyrose26

i need help because i have an error on line 28 of OrderingCustomer that it says cannot access Customer? what did i make wrong in this program.? thanks the product and customer method it complied properly. my only concern is the line 28 of the OrderingCustomer. import java.util.*; import Product_.*; …

Member Avatar for lovelyrose26
0
260
Member Avatar for breezi3

1. Create a Coffee class to represent a single hot beverage. Every Coffee object contains the following instance fields: a. A protected double variable named basePrice. This variable holds the cost of the beverage without accounting for any special options (cream, sugar, etc.). b. A protected ArrayList variable named options. …

Member Avatar for Ezzaral
-1
362
Member Avatar for sheennave

I seem to have a problem refreshing the data within my JTable. I know the code is being run through. I have a JTable which is populated from a selection in a combo box, on first click within the combo box the table displays the correct data. So basically the …

Member Avatar for sheennave
0
2K
Member Avatar for Feriscool

So far, it's all working great, but all I need left is to get the method WORD1() to go to WORD2() when the person types in the correct letters. The first word is "Java". How would I make it so that when they type in "Java", it will go to …

Member Avatar for NormR1
0
486
Member Avatar for SMITA6076

I have a 3x3 array of text fields whose values get transferred to an int array. I need to make sure that integers 1-9 each occur once within the int array. Any ideas on how to go about that? I could do it by verifying that every int is between …

Member Avatar for Ezzaral
0
112
Member Avatar for kukuruku

Hi ,I want to go back after the else to the if statement(step2),how can I do it [CODE]public class main { public static void main(String[] args) { gcd(12,23); } public static void gcd(int m,int n){ int uPrime=1; int vPrime=0; int u=0; int v=1; int mPrime=m; int nPrime=n; int counter=0; if(mPrime%nPrime==0)//step2 …

Member Avatar for quuba
0
92

The End.