35,618 Topics
![]() | |
I am new to Java and as an exercise I am trying to develop the following: 2 JPanels on a JFrame where 1 of the JPanels can be used for drawing. I started from an example from Daniweb from 2010 but can't seem to get a graphic context because the … | |
I am attempting to use a WebBrowser control in C# to display a webpage. I would like my C# application to know when a Javascript function is called within the loaded webpage. Is there anyway to do this? I can't seem to find an event handler for it. | |
Hi, Cosidering the following code ....i want to store the output values into an array.. can anyone pliz help......... import java.io.*; import abr.srw.*; public class Prime1 { // This method tests whether a given number is prime or not. public static boolean isPrime ( int num ) { boolean prime … | |
I need to make 45 objects of a nested class within my main class. I have tried instantiating the objects inside the main class' data fields and then inside of its default constructor. After being instantiated, i need to add 15 of the objects to 15 more arrays (each object … | |
hi, I've got a really long String of bits, like: "0010101011101010011011011010100110101010110101..." And I want to chop it into pieces of eight and make bytes out of them, in an array. what would be a performant way to do this? Thanks Ephron | |
I have this code and it works. It prints out the number, product, and sum, but I need it to be able to work with more than one number. For example if enter 45 6 70 I need it to say Numbers: 45 6 70 Sum: 121 Product: 18900 How … | |
Right, I wasn't sure whether to put this here or in the java forum (since I'm trying this in java) but in the end I figured it is probably a general coding question. Hope I got it right :) So, about object names :) I'm trying to do the c++ … | |
Hi, I have created a small appication to run a number of self extracting archives depending on the option selected. I have the program working and all is going to plan. At the moment my program calls the slef extracting zip by pointing to the location on the hard drive … | |
I just try to calculate 5.3 - 5, and the answer is a bit off. this is the code: [CODE]double answer = 5.3 - 5; println("answer = " + answer);[/CODE] and the output is: "answer = 0.2999999999999998" instead of 0.3. I use Eclipse on win 7 32 bit as a … | |
Hi community, I have a problem with an application which makes use of a mysql database. I have a class which saves the fields of every record on the table. One of the columns is of type Datetime. Sometimes (!) I query this column and get results like with a … | |
hi every body! i set the Layout to be null [CODE]setLayout(null);[/CODE]. when i resize the window, components do not resize. if there any code that i can write to solve my problem? please help! | |
I am supposed to make a charstack program that has to run an error. This is the Question: [COLOR="Red"]Add explicit error reporting for stack underflow via a checked exception (i.e., one that must be declared and caught). Provide a main program that tests this new capability.[/COLOR] I don't what the … | |
Hi friends,I got a problem down here.. Ok here's part of my First GUI code. all I want to do is locate the[ICODE]labelImage[/ICODE] on the bottom half of the [ICODE]panel[/ICODE].. any idea..? I tried the following steps.but it didn't help Set the container's layout manager to null by calling setLayout(null). … | |
![]() | I would like my JSpinner to show up as having a Layout of GridLayout (3, 1), with; Panel.add (JTextField); Panel.add (Up_JButton); Panel.add (Down_JButton); and all 3 (contained) GUI components to be the same size. Is this possible? if (so) How? (My work around is to build it myself, which I'm … |
I have a requirement that my java application should open a web browser when user click on a button and thereafter the web browser open up a page in which user have two options "Agree" and "Not Agree", depending on the button he clicks on, some code comes in the … | |
![]() | Hey, I have a potentially very stupid question. I'm working on a project where I need to input a few numbers. What I would like to do is run it via the command line like, "java test 2 3", where 2 and 3 would be the inputs. I want to … |
We have a problem similar to [URL="http://forums.techguy.org/all-other-software/947576-solved-java-applets-only-working.html"]this[/URL] Clean boot doesn't help and the unchecking of services doesn't help ether. We have a Java applet that's working correctly on xp but isn't working correctly on win 7. The applet runs and the browser asks you to accept the certifiket but the … | |
Hi This is a code for placing a few labels. Now, I have a problem with my grid. I want the 0,0 point in the upper left corner but at the moment it is around the middle. Can someone help me please? [CODE]import javax.swing.*; import java.awt.*; public class test { … | |
hello everyone! I need help....a prof asked for our help to create a simple program for her assignment but i am having a hard time doing it for I am still not an expert in java.....here is the scenario..... [QUOTE]You are about to go to the Super market and would … | |
Here is what I have so far... [code]import java.util.Scanner; public class tst { public static void main (String [] args) { Scanner stdIn = new Scanner(System.in); String sentence = "This is the test."; char response; // user's y/n response int ctr = 65; do { System.out.print ("Would you like to … | |
i create small application in struts but it give me following error : SEVERE: Servlet.service() for servlet jsp threw exception java.lang.ClassNotFoundException: org.apache.commons.logging.LogFactory at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1645) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1491) at org.apache.struts.util.MessageResources.<clinit>(MessageResources.java:57) at org.apache.struts.taglib.html.FormTag.<clinit>(FormTag.java:93) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at java.lang.Class.newInstance0(Class.java:355) at java.lang.Class.newInstance(Class.java:308) at org.apache.jasper.runtime.TagHandlerPool.get(TagHandlerPool.java:126) at org.apache.jsp.Index_jsp._jspx_meth_html_005fform_005f0(Index_jsp.java:109) at org.apache.jsp.Index_jsp._jspService(Index_jsp.java:87) at … | |
Dear experts, i need your kind assistance of the following question: Build a simple banking simulation around the BankAcct class. Require to write a program to act as the "Bank", which provides the following services: a. Create new account. A new account will be created, with a unique bank account … | |
anyone have a link? I want to display data on the GUI that I made using NETBEANS.. I started learning java today, I got error non-static variable jTextField1 cannot be referenced from a static context. [CODE]Connection con = DriverManager.getConnection("jdbc:mysql://localhost/sample", "", ""); Statement stmt = (Statement) con.createStatement(); String select = "SELECT … | |
Dear All, I got an application which have many sql select statement and some are done withing the outler select statement. The problem is that sometimes I get this error com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operations allowed after statement closed.? What could be the cause is it because I am using the statements … | |
The project (JSF 2.0.6!) executes fine, some pages load with no problem, others don't. This is the full stack trace. If there is any code needed, ask for. org.apache.el.parser.ParseException: Encountered " "}" "} "" at line 1, column 9. Was expecting: <IDENTIFIER> ... at org.apache.el.parser.ELParser.generateParseException(ELParser.java:2215) at org.apache.el.parser.ELParser.jj_consume_token(ELParser.java:2097) at org.apache.el.parser.ELParser.DotSuffix(ELParser.java:1064) at … | |
my form have more than one submit button and i want a particular sql query to execute when a particular submit button is clicked.im using jsp to code and mysql database.can anyone pls guide me. | |
why this code is not working?, error: non-static variable jTextField1 cannot be referenced from a static context [CODE]try{ Connection con = DriverManager.getConnection("jdbc:mysql://localhost/sample", "", ""); Statement stmt = con.createStatement(); ResultSet rs = stmt.executeQuery("SELECT name FROM testtable"); while (rs.next()){ String n = rs.getString("name"); jTextField1.setText(n); } stmt.close(); con.close(); }catch(Exception e){ [/CODE] | |
:( Sorry the topic spelled incorrectly.. I can't edit it noe.. sorry for that Friends again need you so badly.. I'm developing my simple GIS application, actually here's what I developed so far.. [CODE] import java.awt.BorderLayout; import java.awt.Color; import java.awt.Dimension; import javax.swing.BoxLayout; import javax.swing.ImageIcon; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JLabel; … | |
I want to find the average score of a LinkedList. My code is [CODE]/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package bowlinggame; import java.util.LinkedList; import java.util.TreeSet; public class BowlingGame { public static void main(String[] args) { TreeSet <String>PlayerNames … |
The End.