32,204 Topics

Member Avatar for
Member Avatar for wonder_laptop

Hello, I have written some java classes to generate a random network. The network is made of : 200 nodes . Each node has a maximum of 50 neighbors. What i want is to Randomly chose a node from that network and GRAPHICALLY show it with its one hop neighbors …

Member Avatar for Taywin
0
127
Member Avatar for wonder_laptop

I created a simple [B]Node.java[/B] class, where each Node instance has an 1-id variable of type int 2-Neighborlist of type Arraylist I wrote a code that gives me a random network, made of 200 nodes, and each node can have up to 55 neighbors. [CODE]for(i=0; i <200; i++ ) // …

Member Avatar for jon.kiparsky
0
259
Member Avatar for jfountai

Hi, I am new to java (normally program in perl and bash). I have an array that has X amount of rows that look like this: 2011-02-24,XXXDAO_456912 - (none) - (direct),(none),(direct),(not set),(not set),0,5447,1,3639.71,3521.86,0,0 What I need to do is take this column - XXXDAO_456912 - (none) - (direct) - and …

Member Avatar for jfountai
0
170
Member Avatar for Shizuo

it give an access denied<java.io.filepermission Item.txt write> error any suggestion for a simple id generator? [code]import java.applet.Applet; import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.io.*; import java.lang.*; public class Shoes extends Applet implements ActionListener, ItemListener { Font SansSerif = new Font ("SansSerif", Font.BOLD, 12); Button create = new Button("Create a …

Member Avatar for Taywin
0
131
Member Avatar for CMAUK

Hi guys, ran into a small problem, i can read & write anything i want to a text file as well as append to the end of the line but I cant seem to figure out how to edit a specific line. Lets say in the text file i have: …

Member Avatar for jon.kiparsky
0
3K
Member Avatar for chrishea

I recently came across [URL="http://www.twilio.com/"]Twilio.com[/URL] that provides API facilities to implement voice or text capabilities through the internet. They aren't the first to provide this kind of service but the capability of the API and their pricing seem to make them worth looking at for anyone who has a need …

1
154
Member Avatar for nickliutw

I write a simple average program, but for some reason I keep getting compiler error. I tried to check my work, but still can't find where do I do wrong. It shows the message on average = total/10, and it says something like unable to reach statement. [CODE] //test import …

Member Avatar for nickliutw
0
99
Member Avatar for Melow

Hy, I'm trying to read from a xml file and save it's data in an ArrayList then a HashMap my xml file looks like this: [code] <components> <component id="door1"> <bounds> <left>10</left> <top>5</top> <width>25</width> <height>10</height> </bounds> <properties> <propertie name="allignment" value="horizontal" /> <propertie name="orientation" value="top" /> <propertie name="isOpened" value="false" /> <propertie name="isLocked" …

Member Avatar for peter_budo
0
295
Member Avatar for not4_me

I hava my program working, but it will not display in the JTextArea of the GUI. I believe that I am missing a line of code. However for the life of me I just cannot figure it out. Please Help. Here is my code: Thank you for the help!!! [code]package …

Member Avatar for Progr4mmer
0
141
Member Avatar for chakebubu

I have a motion detection code that creates a processor for my webcam bu then I want to transmit this video stream also. I am trying to use the VideoTransmit code provided by sun. Can I be able to modify it to use the same processor as my Motion detection …

0
120
Member Avatar for johang_80

Hello, I am new to Java and would like some help. I have to write a small application that converts a user inputted sentence to a string array. The string is 'cleaned' from special characters before splitted into an array (Only numbers and alphabetical characters are allowed). I have managed …

Member Avatar for johang_80
0
340
Member Avatar for efrateshet

Hey all! I am having trouble debugging my program, and after exhausting all of my options i decided to come to you guys. The assignment requires us to create our own custom linkedList class representing a polynomial, where each term is a link. I have most of it working, but …

Member Avatar for efrateshet
0
332
Member Avatar for privatestatic

hey guys i need help with my tic tac toe program - its just the rules of the game not the graphical parts. the gameisover() method isn't working its supposed to check each row and column and diagonal to see if it has all X's or O's and it should …

Member Avatar for jon.kiparsky
0
148
Member Avatar for i_me_roo

Hi guys, Im trying to compile this class below, but its just not working, it keeps sating 'missing return statement' int the method declaration line. Can u see to check if there is anything missing in my code or if iv done something wrong?? Thanks! public class swapping { public …

Member Avatar for jon.kiparsky
0
947
Member Avatar for techie929

Hi, I have initialized an array like this: [CODE] int[][] my_array= new int[28][28]; my_array[-6][12]=2; [/CODE] But when i assign my_array with my_array[-6][12] it is giving me error.I know the doubt is very stupid but I am very confused. I want to store values in an array which has negative as …

Member Avatar for jon.kiparsky
0
94
Member Avatar for nekromantik

Hi I been trying to figure out this problem for last few days but cannot find the answer. I am trying to use nested for loops to try and create a 6 character string using letters/numbers from a array. I need it so that it starts off with one character …

Member Avatar for nekromantik
0
98
Member Avatar for coolbeanbob

I'm trying to create a program in Java that I have in C++. In my C++ file, I have main the main method outside of any classes. Eclipse does not seem to like this. Is this not possible in Java? Do I need to put main in a class? import …

Member Avatar for jon.kiparsky
0
152
Member Avatar for magikkar2nd

Hi i get "illegal start of expression" compiling error ZMOD.java:1295: illegal start of expression for (int j = 0; j < paramArrayOfgz.length; j++) localArrayList.add(paramArrayOfgz[j] = = paramArrayOfgz[j]); ^ 1 error Press any key to continue . . . the whole code is this [CODE] import java.io.BufferedInputStream; import java.io.File; import java.io.FileInputStream; …

Member Avatar for jon.kiparsky
0
585
Member Avatar for mangopearapples

I've been making games for a Nintendo DS homebrew with PAlib and DevkitPro and C code for a while now but I was wondering if DS game development would be available with Java. If not the DS, what would Java be able to make games with? I know that Android …

0
91
Member Avatar for intes77

hello im having problems on how to make a column sorter for my JTable. i want to make a sorter for each column. but i dont know what to do. any advices will be glady accepted :) i've seen other tables that their column headers can be clicked to sort …

Member Avatar for mKorbel
0
1K
Member Avatar for Phil++

Hello, I have a calculator that has a set of memory buttons that I want to store the result of a calculation in.. Here is the code: [CODE] ActionListener memPadListener = new ActionListener() { @Override public void actionPerformed(ActionEvent e) { String memOperator = e.getActionCommand(); double numForMem = 0.0; if (memOperator.equals("M+")) …

Member Avatar for quuba
0
86
Member Avatar for cms271828

Hi, I have a project that uses 'basicplayer', a mp3 player. I can get it to work when it runs in netbeans 6.9.1, but when I build project (into jar file in dist folder), it no longer runs. I need to get the jar files that I added to project …

Member Avatar for cms271828
0
243
Member Avatar for Dragosike

Could anyone point me in the right direction or provide a step-by-step process to create an expression evaluator in Java using StringTokenizer, Stacks, and Recursion? It would be appreciated. The method I need help with is "public float evaluator()" Here's the current code: [CODE] import structures.Stack; import java.io.BufferedReader; import java.io.IOException; …

0
69
Member Avatar for ARaza110

I have imported a project in my Netbeans workspace. It asks me to Resolve missing server problem. I right clicked the project and clicked on 'Resolve missing server problem'. It asks me to Add the server which i did (Tomcat 6.0) and then it asks me to browse the location …

Member Avatar for mKorbel
0
98
Member Avatar for carlitosway17

Hi Am working on s shape inheritance hierarchy project where we are supposed to define 2d or 3d shapes then use a few examples e.g circles or spheres to calculate areas and volumes of the 2d and 3d shapes respectively. Everything is working fine it compiles and builds successfully but …

Member Avatar for quuba
0
238
Member Avatar for Taimoor Rana

Hello Guys, Im Using GridbagLayout as LayoutManager, but I am not able to place my button at top-right of my frame. I'm also attaching my current output and what i actually want to do. here's my code: [CODE]package projectilemotion; /** * * @author Taimoor */ import javax.swing.*; import java.awt.*; public …

Member Avatar for mKorbel
0
127
Member Avatar for drogba123

hi guys, i am trying to store a bigrams into a dictionary. but i am not sure what is the best way to do it?should i use hash table to store it?if yes, how to know whether the word for example am belong to amazing and maybe other words. thanks

0
53
Member Avatar for kiko11

[code=text]jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=C:/Users/Kix/Desktop/IMPORTANT DOCS/oop/BANKSYSTEM/Accounts.mdb;DriverID=22;READONLY=false} Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at banksystem.BankDBDriver.retrieveData(BankDBDriver.java:200) at banksystem.BankSystem.actionPerformed(BankSystem.java:109) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236) at java.awt.Component.processMouseEvent(Component.java:6267) at javax.swing.JComponent.processMouseEvent(JComponent.java:3267) at java.awt.Component.processEvent(Component.java:6032) at java.awt.Container.processEvent(Container.java:2041) at java.awt.Component.dispatchEventImpl(Component.java:4630) at java.awt.Container.dispatchEventImpl(Container.java:2099) at java.awt.Component.dispatchEvent(Component.java:4460) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168) at java.awt.Container.dispatchEventImpl(Container.java:2085) at java.awt.Window.dispatchEventImpl(Window.java:2478) at java.awt.Component.dispatchEvent(Component.java:4460) …

Member Avatar for mKorbel
0
286
Member Avatar for thato21math

what are categories of each of the compile time errors and run time errors with examples for each

Member Avatar for mKorbel
0
47
Member Avatar for Phaelax

I thought "JTree. setRootVisible(false)" would hide the root yet display its children, but it doesn't. I've even tried to expand its children but nothing shows when I hide the root. Here's the code if you need to see it. [code=java] DefaultMutableTreeNode rootNode = new DefaultMutableTreeNode("Root"); JTree projectTree = new JTree(rootNode); …

Member Avatar for villadsen
0
5K

The End.