32,199 Topics

Member Avatar for
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
344
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
360
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
Member Avatar for Acegikmo

I'm trying to make a class called "Sprite", which is supposed to handle spritecards and such. However, I can't seem to be able to get the image height without having an image observer object. Do I have to pass the image observer from the main class to every sprite class …

Member Avatar for Ezzaral
0
195
Member Avatar for Majestics

I want to embed microsft notepad in my java application.... is there any way... i dont want to use java own made notepad....

Member Avatar for JamesCherrill
0
95
Member Avatar for aodpreacher

I currently have a Bellman Ford algorithm set up and I am trying to print the path to that node. My current algorithm is like this: [CODE] path = new int[totaledges]; path[source] = source; distance[source] = 0; String st = ""; for (int i = 0; i < totaledges; i++) …

Member Avatar for bibiki
0
417
Member Avatar for jwenting

The question how to create HTML output to the browser from a Servlet based on XML data often comes up. Here's a fully functional example on how to achieve this using Jakarta Xalan 2 and Xerces 2. The system is quite simple, most of the code is concerned with housekeeping …

Member Avatar for lemomo12345
0
928
Member Avatar for s.w.a

that code that i have problem with it is only accept 2 input from me y and how to solve it please Scanner keyboard = new Scanner(System.in); String IP = keyboard.nextLine(); String TTL = keyboard.nextLine(); Scanner kb = new Scanner(System.in); String conntype = kb.nextLine(); thanks in advance

Member Avatar for s.w.a
0
96

The End.