32,199 Topics
| |
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 … | |
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 … | |
Hello, I got a MacBook Pro for college and i'm trying to program on it. It's all good except when i use the robot class, i don't see any key codes or key events for keys such as function, option, and command. Can i use those keys when using the … | |
Hi there, I am [B]stuck[/B] with a problem, and don't know where to start. I am given a series of cities, and their locations in [B]longitude and latitude[/B]. The goal is to find the two cities with the shortest distance. I have an algorithm which, given the geographical locations (longitude … | |
Hello friends.I got some problems with a program I'm developing for a assignment. I want to add a image(background) to my Jframe and add some buttons. I wrote the code. I can load image into the frame but when I create the Jbutton and re-size it to smaller button it's … | |
[ICODE] I would like to ask assistance how I can retrieve all the scores every game. And how to add the points by not incrementing game 1 and game 2 and so on.. THank you... [/ICODE] [CODE] /* * To change this template, choose Tools | Templates * and open … | |
Hello, The problem is that some how due to garbage collection timings I am having tradeoff's in my performance. The issue can be generalized as: [CODE] public void loop(BlockingQueue<Runnable> queue) { for(Runnable runnable : queue)//line2 { runnable.run();//line4 if(Math.random() > 0.9) System.gc();//line5 } //line7 } [/CODE] Now normally the queue passed … | |
I am in situation like I have a class which have two different subclasses. [CODE]public class SuperClass{ String st; public String getSt(){ return st; } } class A extends SuperClass{ } class B extends SuperClass{ } [/CODE] Now I have another method that want to access the getSt inherited method … | |
I am facing a strange problem, and seriously I spend lot of time in experimenting different things to get it work but all in vain. I have a JTree whose nodes are been modified by my custom TreeCellRenderer class. My class creates a JPanel for every node and places components … | |
Hello, I would like to know what is the best way to populate a tree gui which has the following details: My application should reflect a tree structre with about 8000 members but directly under the root there are maximum 15 members.Its clear that each time a user open the … | |
Dear experts, Please kindly advise me in how i should write the column operation: The following is the full codes: [CODE]import java.util.*; public class Matrix { public static void main(String[] args) { // declare the necessary variables int N, M; String operator; int index; int sum; int [][]matrix = new … | |
Hi this is samar here I'm developing a application in which i want that when some one press print button the info in the form get printed I'm developing my application in netbeans 7.0.1 pls help | |
I have a very stupid question. I use a JToggleButton. now I want to know if the setSelected is true or false. thus an if function, but how to write one because I get errors. thank for your support [CODE]if(Btn2.setSelected() = true){ }[/CODE] |
The End.