35,618 Topics
![]() | |
I am very green at writing Java, I am trying to go through our chapter examples and putting in data for a mortgage calculator with a GUI. This code is far from finished but the example says "Now save and compile" and this is where I am getting the error … | |
Ok in my program i'm trying to prevent a user from adding too many objects. i have three arrays called subs airs and dests, the user shouldn't be able to have more than a total of 10 objects between them. in order to add an object to an array the … | |
Hello. I have a PreparedStatement/CallableStatement, a ResultSet and a Connection... Now after execution finishes, i want to release my resources. First I close my connection... I also want to release my ResultSet and my PS Will assigning null to my Connection object after closing the Connection object also assign null … | |
[code=cplusplus]#include <iostream> using std::cout; using std::cin; using std::endl; using std::ios; #include <iomanip> using std::setiosflags; using std::setprecision; using std::setw; int main() { const int PEOPLE = 5, <strong class="highlight">PRODUCTS</strong> = 6; double sales[ PEOPLE ][ <strong class="highlight">PRODUCTS</strong> ] = { 0.0 }, value, totalSales, productSales[ <strong class="highlight">PRODUCTS</strong> ] = { 0.0 … | |
chunk of code... [CODE] public void init(ServletConfig config) throws ServletException { Map map = new HashMap(); } protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html;charset=UTF-8"); [U]map.put("one1","two2");[/U] [/CODE] compiler says 'map' cannot be resoled......why so? wht shd i do? thanks, BeanBoy | |
Hi Experts, I already have a database set up in SQL Server that I have used with vb.net in the past, and would like to use it with JSP. I just started JSP last week, and have no idea what I'm doing. I downloaded the sqljdbc driver from Microsoft's website … | |
Before you killing me, I know about the: [url]http://www.daniweb.com/forums/thread141776.html[/url] , but for the moment, I DON"T have the time. Secondly, I'm new to Java platform and JSP. I'm trying to make a simple application, but I don't get it. I'm using Intellij 8, Tomcat 6, MySQL I have a java … | |
hi helper, i'm trying userlogin web app....where logged in user ID's are sent to a hash map .....so that admin can view logged in users list... my problem is... hash map is creating new map (which replaces the old map) when ever a user logs in.... so admin is able … | |
hello , can you tell me how to delete the previous contents in the file,while adding new contents in java???? | |
Hi, i successfully created the JAVA Applet and embedded it in the HTML page. The applet class is as follows: [code=JAVA] import javax.swing.JApplet; import java.awt.Graphics; public class HelloWorld extends JApplet { @Override public void paint(Graphics g) { g.drawRect(0, 0, getSize().width - 1, getSize().height - 1); g.drawString("Hello World !", 5, 15); … | |
Hi, I am new to java programming. I have been creating a simple applet. Which is as follows: [code=java] public class HelloWorld extends JApplet { public void paint(Graphics g) { g.drawRect(0, 0,getSize().width - 1,getSize().height - 1); g.drawString("Hello world!", 5, 15); } } [/code] This code is saved in a file … | |
Use a two-dimensional array to solve the problem. A company has four sales people (1 to 4) who sell 5 different products (1 to 5). Once a day, each sales person passes in a slip for each type of products sold. each slip contains: a. The salesperson number b. The … | |
pls i need to change the image on a Jlabel to another image when a user inputs a string word "change". How do i go about it? | |
hi people...was working with hashtable's.... code is as follows : [CODE]public class X{ int a; int b; X(int a, int b){ this.a = a; this.b = b; } public static void main(String a[]){ Map map = new HashMap<X,String>(); map.put(new X(1,2),"some value"); System.out.println(map.get(new X(1,2))); } }[/CODE] gettin o/p as null...is there … | |
The assign was a game called FortuneCity The prof wanted us to follow the MODEL - VIEW - CONTROLLER implemention. The MODEL contains only functions that can be used in the game. It has NO GUI stuff in it. The VIEW contains only contains the GUI interface. The CONTROLLER allows … | |
i tried the following code but not getting the desired output. I need to extend Applet class along with dialog class.how do i do that? [code=JAVA] import java.awt.*; import java.awt.event.*; import java.applet.*; /*<applet code="YesNoDialog" width=400 height=400></applet>*/ public class YesNoDialog extends Dialog implements ActionListener { private Button yes=new Button("Yes"); private Button … | |
i am currently working on a GUI for a program. i have created 100 jpanels which i have set opaque and colored blue. All of these blocks get an error which says that an identifier is expected for the lines which set them opaque and colors them, heres an example: … | |
Hello. I'm trying to write an application, which after pressing a key does a particular action. The thing is I need the application to receive key events even if JFrame isn't itself focused (is iconified). I've read somewhere that it cannot be done - is that true? If it is … | |
Hello, I am new to Java programming and I just got the NetBeans IDE. One problem that I've been having with Java is the input. [code=java] package learning; public class Main { public static void main(String[] args) { int num1 = 0, num2 = 0; cin >> num1 >> num2; … | |
So I'm working on a GUI program in Java, and I'm having problems dealing with some text fields i have. The text fields are resizing themselves the same size of the window, making them much larger than I wish. [IMG]http://i6.photobucket.com/albums/y201/ElChibo/tioex-2.jpg[/IMG] I would like all of the text labels to be … | |
Ive know started up programming again. My last try was in delphi where my best project was a security screensaver. Ive know decided to start up programming again and my choice this time was java whit netbeans and my project would be to rewrite the Security screensaveer and add any … | |
i trying to write a code which will read from user input of the percentage of some words to be appear. [B][U]example[/U][/B] user will input 50 5 when the program runs. 50 is the total number of runs and 5 means of the total runs it will have 5% of … ![]() | |
First.java [CODE] ServletContext one=getServletConfig().getServletContext(); one.setAttribute("UsersList",map); [/CODE] its ok if i accesed 'one' into a jsp page. is it possible to access 'one' in to another java(servlet) page? if yes.....how? | |
Hello Every one, please tell me how to use dotproperty file in jsp? like i m trying to code a login page and i want if any user input wrong or null value so on the same page msg should come like please enter correct username or something like that..... … | |
hi, I am trying to solve this game. The goal of this game is to fill a 4x4 grid of numbers so that each column, each row and each of the four 2x2 boxes (called regions) contains all of the numbers from 1 to 4. The figure below shows a … | |
Hi, I am using a code to read a grayscale image and store the pixel value in a 1D array. But the code is taking a default image(though i am providing the complete path for the image to be loaded) and the height and the width are returned as -1. … | |
there are many key words in java cryptography and none of them is been recognized in my system. Is there any way i can implement java cryptography...? | |
Hi, I am using a code to read a grayscale image and store the pixel value in a 1D array. But the code is taking a default image(though i am providing the complete path for the image to be loaded) and the height and the width are returned as -1. … | |
hello, in the below code i have established conection through jdbc to oracle database,here my program will give continous ping to the server and stores the result in to the file. again by opening the file iam reading the file and searching for the "Request Timed out " pattern and … ![]() | |
I have written two classes, one the GrabPixels class which takes an image and extracts the pixels from it. The FFT class then tries to call grabPixel. The problem I get is that img in this line [CODE]grabPix = new GrabPixels(img);[/CODE] is null. I'm not too sure why. Could someone … |
The End.