36,051 Topics

Member Avatar for
Member Avatar for rojo821

my java programs are not running. actually they are running but the are invisible. I click on task manager and they show running. I actually click on the screen and you hear an error ding as if you are clicking on the window in a wrong spot. I have windows …

Member Avatar for stultuske
0
186
Member Avatar for sowmyacrao

Hi All, I want to create a manifest file through java program and wanted to capture the required parameters like excluding generated code , some of the legacy application through manifest file and wanted to generate autmoatically. If anybody have an idea about this kind of requirement do advice, Thanks …

Member Avatar for NormR1
0
34
Member Avatar for Alex_

Hello. That function worked fine firstly. Then i started to change some code, but nothing essential, just changing some variables to private class fields etc. I've restarted the OS , but has same output this is my code now: [code] doc = (AbstractDocument) jTextPane1.getDocument(); FileReader theFileIO = null; char[] c …

Member Avatar for Alex_
0
108
Member Avatar for monaprerita

[code]import java.awt.*; import java.awt.event.*; import java.applet.*; public class AL extends Frame implements WindowListener,ActionListener { TextField text = new TextField(20); Button b; private int numClicks = 0; public static void main(String[] args) { AL myWindow = new AL("My first window"); myWindow.setSize(350,100); myWindow.setVisible(true); } public AL(String title) { super(title); setLayout(new FlowLayout()); addWindowListener(this); …

Member Avatar for NormR1
0
1K
Member Avatar for ravi25a

i have created a delete.jsp page which checks for datatype entered in the fields and when user enters the student id will delete it from database.i am succesfull while following insert.jsp but i am geting proublem while updating and deleting. i have linked insertiion,updation and deletion jsp files to 1 …

Member Avatar for parry_kulk
0
197
Member Avatar for jonoj

Hey guys :) I'm making a code and testing it in drjava but at this stage there is just one function I am having trouble with. Here is my code so far [code=java] import java.util.ArrayList; class Player { //instance fields, a name, a place, and an inventory String name; LocationID …

Member Avatar for JamesCherrill
0
157
Member Avatar for manmeet khanuja

Hi all, I am trying to create a website project having multiple pages showing data from database. I am using Netbeans IDE 6.7 and Apache Tomcat Server and Microsoft SQL Server 2005. I was developing this site using JSP,Servlets,JavaBeans to fetch data using MVC Architecture but since i needed some …

0
47
Member Avatar for EverydaySunday

Hi everyone, i encountered this error when i want to forward user to different page according to different situation. The error occurs if the login is null and the cash is null :( seems like the it does not know where to forward because there is two forward. is there …

Member Avatar for Stefano Mtangoo
0
1K
Member Avatar for moman1981

I have been working on a tic tac toe game for a couple of days. And I just realize that I needed to do a GUI for it. With the following code, would it be fairly easy to add a GUI to this? and if so, what would be the …

Member Avatar for NormR1
0
363
Member Avatar for mahdi68

Hi is java suitable language for robot programming ( like line follower robots) ??? thanks

Member Avatar for NormR1
0
88
Member Avatar for abctoz

Hi All, I have created a CON, PRN folder([url]http://www.hoax-slayer.com/con-folder-name.shtml[/url]) using "md\\.\\c:\con " through DOS prompt, i was trying to create same CON and PRN folder through Java code using "Runtime.getRuntime().exec("md\\\\.\\d:\\con");" But it is giving following Exception : Cannot run program "md\\.\d:\con": CreateProcess error=2, The system cannot find the file specified …

Member Avatar for masijade
0
180
Member Avatar for ttboy04

Hello, My ouput is showing as... "1 2 3 (10)(23)(29)" when it should be... "1(10) 2(23) 3(29)" I don't think I am too far off. Here's the code and thanks in advance. // int[] Groups = {10, 23, 29}; in the constructor public String toString() { String tempStringB = ""; …

Member Avatar for ttboy04
0
107
Member Avatar for johndoe444

Hi, I am getting this exception: [CODE] javax.naming.directory.InvalidAttributeValueException: [LDAP: error code 21 - ob jectClass: value #0 invalid per syntax]; remaining name 'dc=jndiTest' at com.sun.jndi.ldap.LdapCtx.mapErrorCode(Unknown Source) at com.sun.jndi.ldap.LdapCtx.processReturnCode(Unknown Source) at com.sun.jndi.ldap.LdapCtx.processReturnCode(Unknown Source) at com.sun.jndi.ldap.LdapCtx.c_createSubcontext(Unknown Source) at com.sun.jndi.ldap.LdapCtx.c_createSubcontext(Unknown Source) at com.sun.jndi.toolkit.ctx.ComponentContext.p_createSubcontext(Unknown Source) at com.sun.jndi.toolkit.ctx.PartialCompositeContext.createSubcontext(Unk nown Source) at com.sun.jndi.toolkit.ctx.PartialCompositeContext.createSubcontext(Unk nown Source) at …

Member Avatar for johndoe444
0
144
Member Avatar for P00dle
Member Avatar for MrBlack

Hi i m new to java, i want to make a simple application with netbeans ,(To Learn) i want to learn how to get data from a data base(mysql database) and display to textBoxes, and also want to learn how insert delete update database, Are there any tutorials or ebooks.plz …

Member Avatar for MrBlack
0
115
Member Avatar for abctoz

HI All, I want to create one folder which should open only with my application. Is it possible through JAVA ?? Please Guide me and send the Java code if possible Thanks in Advance

Member Avatar for masijade
0
337
Member Avatar for BuhRock

I have to write a program that creates a GUI and asks the user to select from a group of buttons which time of the day they made the call, and input in a text field how many minutes the call was. for the day time, it's supposed to be …

Member Avatar for NormR1
0
765
Member Avatar for spartanace

Hey for some reason my rectangles are being drawn after the start variable has been incremented all the way through. This is causing them to go off the screen. What i wanted, is like in the code, i want it to draw, increment draw increment until the loop is finished.[CODE]import …

Member Avatar for NormR1
0
609
Member Avatar for Alex_

I'm trying to make a html editor. I need to set different colors for different words... I managed to the change text's background color, but not it's foreground. Can some one help me? this is my code [code=java] public class HEditorView extends FrameView { public HEditorView(SingleFrameApplication app) { super(app); initComponents(); …

Member Avatar for Alex_
0
328
Member Avatar for MrBlack

There is an error , it is cannot find Symbol [CODE] import java.sql.*; public class Main { public static void main(String[] args) { try { Class.forName("com.mysql.jdbc.Driver"); String connectionUrl = "jdbc:mysql://localhost/mytestdb?" + "user=root&password=PHP"; Connection con = DriverManager.getConnection(connectionUrl); } catch (SQLException e) { System.out.println("SQL Exception: "+ e.toString()); } catch (ClassNotFoundException cE) { …

Member Avatar for MrBlack
0
4K
Member Avatar for fankoff

Hi guys, I need an advice on a html-refreshing issue I have one html document containing three different forms with three submit buttons for each form. The first form has some input fields for personal information (name,surname, age etc). When the user fills in the fields, presses the submit button, …

Member Avatar for fankoff
0
136
Member Avatar for ceyesuma

Hello: Soon I will need to have my foriegn keys working. I have tried to set them up with no luck. Could someone show me how to set the payee_uid below? I am using an Apache Derby Embbeded Db 10.5.3. Thanks [code] <entry key="createStudentTable"> CREATE TABLE student ( stu_uid VARCHAR(11) …

Member Avatar for ceyesuma
0
93
Member Avatar for bymak87

I had to write 10 objects of cars into an array and now my problem now is writing the array into a text file. I am able to get the correct output in the console, but when I open the text file I get part of the desired output, as …

Member Avatar for JamesCherrill
0
231
Member Avatar for intes77

Hello im having problems with my code. i wanted to make a program that would let me enter anything and then place each one of them inside the array. [CODE]import java.util.*; class charAt { public static void main(String[]args) { Scanner input=new Scanner(System.in); String[]sample=new String[52]; String enter; int x; System.out.println("Enter something"); …

Member Avatar for intes77
0
6K
Member Avatar for intes77

i am having problems in reading the contents of my .dat file. the contents of my .dat file are the following: 10.20 60.20 70.20 25.25 1.1 2.2 3.3 4.4 my expected output should look like this: --------- --------- --------- --------- 10.20 60.20 70.20 25.25 1.10 2.20 3.30 4.40 but when …

Member Avatar for intes77
0
151
Member Avatar for daudiam

java class files are not loaded into memory till the time they are referenced. If this is true, then the use of import statement is just to save a bit of typing. Is it the case ?

Member Avatar for JamesCherrill
0
131
Member Avatar for danarmstrong

I have a servlet written in Java and I am attempting to send data to the method using C and the WinSock2 API. When I attempt to just send the raw data I get an invalid stream header error. I am not sure how I should go about handling this …

Member Avatar for niyujin
0
83
Member Avatar for leiger

I'm trying to list a bunch of buttons vertically, but am having problems even getting that much done. I'm pretty sure I have the scroll pane working (it just isn't being used yet so I can't test it). This is part of an assignment so I'd prefer not to post …

Member Avatar for leiger
0
2K
Member Avatar for adaku

Please can one help me with a better way of Converting Date( in Hour and Minutes) in to Double or Integers. I want to use it for arithmetic purpose e.g, if the Date Input is 6 hrs:30min, then i want it converted in to 6.5, ....or 12 hrs: 15 min …

Member Avatar for JamesCherrill
0
87
Member Avatar for divyakprabh

hello, I have created a web application using java,mysql I have to still write functionalities where in the functionalities need the current user name for a web application. The functionalities like view profile needs it. Can anyone please help me out in this. Thanks

Member Avatar for finito
0
87
Member Avatar for white feather

I get this error when i write to my C drive using an ObjectOutputStream [CODE] List<String> strings = new ArrayList<String>(); strings.add("test1"); strings.add("test2"); strings.add("test3"); IO.IO.writeListToFile("C:\\Users\\coconnor\\Documents\\Java\\ToolKit\\", strings); [/CODE] [CODE] public static void writeListToFile(String location, List<?> list) { ObjectOutputStream p = null; File f = new File(location); try { p = new ObjectOutputStream(new …

Member Avatar for white feather
0
5K
Member Avatar for mitch9654

Hello, I am having trouble writing to a file from an applet (in a local directory) without totally demolishing the file and erasing it's contents (okay, maybe I am exaggerating on the [I]destroying[/I] part :P, but it does erase it!). Also, I just can't make the applet [I]write[/I] to the …

Member Avatar for mitch9654
0
146
Member Avatar for muddy900

Hi guys, I'm trying to read a file which contains text in arabic. The file text is aligned from right to left. But when I read it, the output is from left to right. Is there any way to align it from right to left? I'm trying to display the …

Member Avatar for muddy900
0
93
Member Avatar for neti1987

hi! I add code example. when I run that, I get exceptions: [CODE] /******************************************************************************* * Copyright (c) 2000, 2005 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this …

Member Avatar for neti1987
0
285
Member Avatar for ceyesuma

I can't seem to find the correct way to add an alias in a select statement. Is there a way to do this using an embedded Apache derby database? The usual way will not work. ex: [icode] SELECT uid AS User,fName AS First,lName AS Last FROM table[/icode]

Member Avatar for ceyesuma
0
718
Member Avatar for ceyesuma

Hello: I have created a Desktop that interacts with a embedded db. I also have crated a flash program that opens and runs itself in any web browser. My inquiring is to find out if I can create a button to launch this flash program from my Java app? Also …

Member Avatar for NormR1
0
330
Member Avatar for Viruthagiri

My project is e learning project. I've a "choose the correct answer" module. When the click the "begin test" button it should fetch the questions and options from database and display it. Instead of that my page displays "java.lang.NullPointerException". I've assigned unique values for each error. So the exact error …

Member Avatar for ~s.o.s~
0
143
Member Avatar for tyson.crouch

G'day, I was wondering if anyone here knew how i could convert java output to a formatted PDF file? If anyone knows of a reliable open-source project it would be much appreciated. Thx, TC

Member Avatar for ~s.o.s~
0
49
Member Avatar for mikev9359

I'm trying long distance learning & I'm having many issues. I was able to write a program that runs well using an IF loop. but now I am to use that same exact program with a WHILE loop & I just can't understand any explanation I receive from the instructor. …

Member Avatar for XP1
0
359
Member Avatar for leiger

This is code I've taken from another website, and adapted to work with the JFileChooser. I got it working so that someone could select a java file with the chooser, and I'd send a "java -jar FILENAME" to the console and the app would launch. However as soon as I …

Member Avatar for Gribouillis
0
648
Member Avatar for jcstarjcstar

can any one provide java code for bellman ford algorithm with java applet? here is the algorithm: BELLMAN-FORD (G, w, s) INITIALIZE-SINGLE-SOURCE (G, s) for each vertex i = 1 to V[G] - 1 do for each edge (u, v) in E[G] do RELAX (u, v, w) For each edge …

0
24
Member Avatar for leiger

Python works fine in the console, but I'm having problems using python in a Java program. In case someone here has any ideas, I'm posting a link back to my original post (please reply there and not here): [url]http://www.daniweb.com/forums/post1246152.html#post1246152[/url] Thanks!

Member Avatar for leiger
0
154
Member Avatar for nagyonbalogh

I have a problem with my images in my java project. The project is a simple chess program for human players only. The problem is that it works fine in JCreator Lite's Apllet viewer but when I try to open it in an HTML it gives me the error mentioned …

Member Avatar for mitch9654
0
388
Member Avatar for pi_lord12

Hey, so I'm trying to make a text-based game using mostly Swing GUI; the code I have so far is below. When I use JOptionPanes I modify the icon, title, and suchlike on them, so I have about two lines of code for every JOptionPane. I created methods for them …

Member Avatar for pi_lord12
0
175
Member Avatar for sara khan

I m making a website of Online Programming Forum.. But i m a bit confused about how to display new thread generated by a user to the main window... Can anybody help me... Thanx...

Member Avatar for sara khan
0
81
Member Avatar for evak77

I need a little help with this code, I cannot get it right, and i know it is something simple that i am missing. Can someone help me out please. [CODE] import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.text.DecimalFormat; import java.util.*; import java.lang.*; import java.text.NumberFormat; public class week2 extends JFrame …

Member Avatar for quuba
0
104
Member Avatar for IsaB

Hi, I am new at this... I am trying to display data from a text file to a JSP file and I'm using BufferedReader to do this but having problems getting to the file. Which directory should I put the text file? Should I add anything to web.xml to reference …

Member Avatar for parry_kulk
0
565
Member Avatar for denmiller3
Member Avatar for mhopper

All, I am developing a Socket Server in Java. Its job is to receive TCP packets from a unit sending Hayes AT commands via GPRS/sim chip combination over broadband. The software for the unit sending the packets has been written in C++. Packets sent are all in hex bytes. I …

Member Avatar for mhopper
0
8K
Member Avatar for swati.n

hi I want to have a screen in my mobile application wherein i would be able to have text as well as images on the same screen. i would have some simple text following it would be 2 or 3 images on the same screen. looking forward for some solution. …

0
35

The End.