35,618 Topics

Member Avatar for
Member Avatar for idgirl

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 …

Member Avatar for idgirl
0
150
Member Avatar for Laidler

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 …

Member Avatar for Laidler
0
141
Member Avatar for Xessa

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 …

Member Avatar for JamesCherrill
0
371
Member Avatar for chingkoysilog

[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 …

Member Avatar for javaAddict
-1
194
Member Avatar for beanboy

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

Member Avatar for beanboy
0
94
Member Avatar for lolwtf

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 …

Member Avatar for stephen84s
0
104
Member Avatar for TryingToDo

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 …

Member Avatar for stephen84s
0
139
Member Avatar for beanboy

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 …

Member Avatar for beanboy
0
124
Member Avatar for rajachandra

hello , can you tell me how to delete the previous contents in the file,while adding new contents in java????

Member Avatar for javaAddict
0
109
Member Avatar for nccsbim071

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); …

0
63
Member Avatar for nccsbim071

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 …

Member Avatar for nccsbim071
0
181
Member Avatar for shockwave_05

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 …

Member Avatar for chingkoysilog
0
2K
Member Avatar for get2tk

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?

Member Avatar for and12
0
83
Member Avatar for gowth08

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 …

Member Avatar for CrazyDieter
0
94
Member Avatar for and12

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 …

0
63
Member Avatar for akulkarni

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 …

Member Avatar for quuba
0
134
Member Avatar for Laidler

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: …

Member Avatar for Laidler
0
91
Member Avatar for Zibo

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 …

Member Avatar for quuba
0
2K
Member Avatar for JameB

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; …

Member Avatar for JameB
0
151
Member Avatar for ChiboSempai

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 …

Member Avatar for BestJewSinceJC
0
127
Member Avatar for darkyere

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 …

Member Avatar for BestJewSinceJC
0
138
Member Avatar for picass0

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 …

Member Avatar for harsh2327
0
87
Member Avatar for beanboy

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?

Member Avatar for Thirusha
0
73
Member Avatar for pandeyprashant

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..... …

Member Avatar for pandeyprashant
0
205
Member Avatar for zach_assi

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 …

Member Avatar for Thirusha
0
103
Member Avatar for fareast87

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. …

Member Avatar for fareast87
0
133
Member Avatar for rahul8590

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...?

Member Avatar for rahul8590
0
122
Member Avatar for swetaseng

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. …

Member Avatar for fareast87
0
192
Member Avatar for rajachandra

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 …

Member Avatar for harsh2327
0
92
Member Avatar for jooa

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 …

Member Avatar for quuba
0
204

The End.