32,204 Topics

Member Avatar for
Member Avatar for josh.leong2

Hey guys, I am almost at the end of my assignment but when I showed my code to a friend and also my demonstrator I was told the way I was passing the data between the three classes for "menu prompt (2)" was wrong. My original program had methods I …

Member Avatar for josh.leong2
0
208
Member Avatar for sing1006

i have problem reading the data from text file. The first line in my text file should go to 1st row but it go to the column, here is my code. JScrollPane scrollPane_1 = new JScrollPane(); scrollPane_1.setBounds(30, 288, 944, 207); frmDevelopNewProgram.getContentPane().add(scrollPane_1); String[] columns={"Program Code","Program Name" ,"Major","Abbreviation"}; lap_table = new JTable(); …

Member Avatar for sing1006
0
671
Member Avatar for Ali_khan11

i have a text field with name "date" and i want to retrieve all he records from database when user write a specific date on that text field.......I am using MS access data base......Query below is not showing any record String date=request.getParameter("OrderDate"); String query = "SELECT * FROM DoorStepRequests where …

Member Avatar for stultuske
0
1K
Member Avatar for jed247

This is the message it gave me :( Pls help Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at javax.swing.ImageIcon.<init>(ImageIcon.java:205) at PPMSPrototype.initComponents(PPMSPrototype.java:841) at PPMSPrototype.<init>(PPMSPrototype.java:11) at PPMSPrototype$26.run(PPMSPrototype.java:1333) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:733) at java.awt.EventQueue.access$200(EventQueue.java:103) at java.awt.EventQueue$3.run(EventQueue.java:694) at java.awt.EventQueue$3.run(EventQueue.java:692) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDo main.java:76) at java.awt.EventQueue.dispatchEvent(EventQueue.java:703) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThre ad.java:242) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread. java:161) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre ad.java:150) …

Member Avatar for Daemon_CC
0
265
Member Avatar for masonketcham

I have an assignment that is due tonight and I ran into a few errors. The first two parts compiled successfully just the third one ran into errors. I don't know what went wrong. The errors I am getting are C:\Users\Owner\Desktop\Inventory Part 3\inventoryTest.java:51: error: cannot find symbol NumberFormat nfc = …

Member Avatar for masonketcham
0
265
Member Avatar for revertedlogic

For my Java homework I had to make a program that simulates 100,000 people going 25 times around a monopoly board and finding the percentage times a space is landing on. I get this error when I run it. Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 39 at Monopoly.analyze(Monopoly.java:86) at TestMonopoly.main(TestMonopoly.java:6) Here …

Member Avatar for JamesCherrill
0
333
Member Avatar for asifalizaman

i need someone to assist me in writting lamda expression. THE CODE IS ABOUT 15 LINES use this code snipt List<fruit> fruits = createFruitArrayList () ; Frit LargeApple = null; for (Fruit fruit:fruits) { if (fruit.getType() == null largeApple = fruit; } } } just rewrite plz

Member Avatar for jwenting
0
173
Member Avatar for custurd122000

I'm trying to read a text file of a graph and print information about the graph including the order and size of the graph, rather it is a directed or undirected graph, if it is directed the in and out degree, and the and a list of all vertices for …

0
134
Member Avatar for ntaraaki

Hi, I'm a beginner with Java, can anyone tell me where my error is, I'm sure there's something I'm missing here with the array logic: public void scalarMultiplication(int c) { for( int i=0; i <values.length - 1;i++){ for(int j=0; j < values.length - 1;j++){ values[i][j] = values[i][j] * c; } …

Member Avatar for JamesCherrill
0
236
Member Avatar for sireiz

Is there any syntax error in this code or query because i am not getting the required report? I have created a JFrame with JDatechoosr. When i select the dates and click view report, it gives me empty report while i know there is data within the specified date range. …

Member Avatar for sireiz
0
540
Member Avatar for anku83

package pkgnew.approach; import java.io.*; import java.io.IOException; import java.util.*; import java.io.BufferedReader; import java.util.ArrayList; import pkgnew.approach.NewClass1; public class NewApproach { public static void main(String[] args) { NewClass1 no=new NewClass1(); BufferedReader br = null; Date d1; int n, c, d,k, swap,i=0,j=0,no_of_selected_item=0,newsupport=0,multiply=1,support=0,t=0; int numItems,numTransactions; double minSup; long diff; String configFile = "F:\\DP1\\DPmodification\\Config.Datasetsmall.txt"; try{ FileInputStream …

Member Avatar for anku83
0
212
Member Avatar for Michele T Roo
Member Avatar for James_30

What is a goodway to code a btn ation. To inialize adeaktop app from another desktop app. More over,run thejar use a eclipes build.xml . I built both apps in netbeans environment .

Member Avatar for James_30
0
162
Member Avatar for Nnadozie

Hello somebody should please help me with codes to run this assignment below: It should have a button that when clicked causes your code to simulate rolling a dice 100 times. Your program needs an array that will count the number of times that each of the six possible numbers …

Member Avatar for iamthwee
0
147
Member Avatar for newbie14

I have a webservice to be accessed which is based on request and response. Below is how my php codes are works perfectly fine. class fNewRequest { function fNewReq($pTK, $pVID) { $this->pTK= $pTK; $this->pVID= $pVID; } } /* Initialize webservice with your WSDL */ $client = new SoapClient("http://**.**.**.*/**/**/***/webservice.asmx?WSDL"); /* Set …

0
128
Member Avatar for montjoile

I want to run a java application which calls a web service. Everything works fine from the netbeans ide, but fails when I run the .jar generated. What could be the problem? How can I check the content type that the error is pointing at? The error says: **SEVERE: SAAJ0537: …

Member Avatar for montjoile
0
3K
Member Avatar for SintherPal

I struggle to find a solution at my java project... It gives a lot of bonus as well.. so, i would really appreciate it if someone is willing and expert with java and can help me with my project, if he has time to help me with it. :) If …

Member Avatar for SintherPal
0
281
Member Avatar for kal_crazy

try { /* Class.forName ("sun.jdbc.odbc.JdbcOdbcDriver"); String loc = "jdbc:odbc:Library"; String filename = "C:\\Users\\Krishal Lad\\Desktop\\Library.mdb"; String database = "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb, *.accdb)};DBQ="; database+= filename.trim() + ";DriverID=22;}"; // add on to the end con = DriverManager.getConnection (database);*/ Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); String database = "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb,*.accdb)};DBQ=Library.mdb;"; System.out.println("connecting to database..."); Connection conn = …

Member Avatar for 203428
0
429
Member Avatar for AbhishekTecnics

I am trying to execute xmlaccess.bat file of web sphere Portal server uisng java but not getting any issue as well as no output but when i execute this bat file through command prompt,its working Fine..why it is ? dont'Know..please Help me out... MyAPP : public class BatchAPP { public …

Member Avatar for AbhishekTecnics
0
2K
Member Avatar for masonketcham

Not sure what it is nedding I'm needing help on coding this program I get back some 2 errors. What I have is: public class Inventory { private double ItemNumber; //to store Item number private String ItemName; //to store Item name private double UnitsInStock; //to store number of units in …

Member Avatar for Doogledude123
0
327
Member Avatar for Shreyas_1

I have two different format of code for insert query using jsp+servlet+mysql. Code-1 ====== Class.forName(JDBC_DRIVER); // Open a connection out.println("Connecting to a selected database..."); con = DriverManager.getConnection(DB_URL, USER, PASSWORD); out.println("Connected database successfully..."); // Execute a query st = con.createStatement(); sql = "insert into users (name,email,password) values ('" + name + …

Member Avatar for stultuske
0
2K
Member Avatar for spopivich

for my assignment I am to only add the sort and total inventory methods in the inventory class. And not create an array in the inventory class at all. My inventory class should contain all the variables needed to use with the two new methods: sort and calculate total inventory.By …

Member Avatar for stultuske
0
426
Member Avatar for awsa.qwase

if i make small jframe with 2 jComboBox(jComboBox1,jComboBox2) and a jbutton I want that when the user click on jbutton it will display jComboBox1 and jComboBox2 in the label

Member Avatar for JamesCherrill
0
107
Member Avatar for wids101

I need help with my getName method. The error message is invalid method declaration, return type required. And i don't know how to write a method to change the canidate's name. Thank you in advance. /** * Class to create a Candidate object * * @author la * @version 4/21/07 …

Member Avatar for stpatrck
0
203
Member Avatar for Doogledude123

Alright, so I am building a Converter to convert ASCII to Binary and for some reason, the for each loop stops working when it hits a space, and I have no idea why. I'm probably just over thinking it. Extra: Can you tell me how to force the output binary …

Member Avatar for Doogledude123
0
5K
Member Avatar for wids101

My code compiles but it has a java null error. import java.util.Arrays; public class Example { private int[] NumberArray; public Example() { int[] NumberArray = new int[4]; } public void setNumberArray() { NumberArray[0] = 20; NumberArray[1] = 15; NumberArray[2] = 22; } public void printnumberArray() { for(int index=0; index &lt; …

Member Avatar for wids101
0
153
Member Avatar for shaquib65

I have program that does OCR conversion using asprise plugin, now i want to save the whole console output to a text file. If somebody can point me in the right direction it would be very helpful. By the way I use Eclipse. Thanks.

Member Avatar for shaquib65
0
218
Member Avatar for juegosfrivs

<style> .msgBox{ position:absolute; z-index:10; border-radius:5px; border:1px solid #F5F5F5; background-color:#DDD; box-shadow:1px 1px 5px #999; overflow:hidden; display:none} .msgBox ul, .msgBox li{ list-style:none; padding:0; margin:0; border:0} .msgBox .title{ border-bottom:#AAA solid 1px; padding:5px; background-color:#CCC; font-family:Gotham, "Helvetica Neue", Helvetica, Arial, sans-serif; font-weight:bold; text-shadow:1px 1px #DDD; font-size:12px} .msgBox .msgContent{ border-top:#F5F5F5 solid 1px; padding:5px; text-shadow:1px 1px #F1F1F1; …

Member Avatar for juegosfrivs
0
270
Member Avatar for Shoes Mosh

The bank already has a Java application. But they want certain new features to be added and some existing functionality to be changed as per their new policies. For this, Angelina needs to address the following issues: [20 Marks] 1. There is a class named Accounts which calculates the interest …

Member Avatar for Shoes Mosh
0
140
Member Avatar for anku83

I want to find all the subset of a set.Can sumone plz help me through this.I have a array which would consisting ={1,4,5,6,7} i want all subsets.. {1,4} {1,5}...{1,4,5,6} {1,5,6,7} {1,4,6,7}..etc.

Member Avatar for JamesCherrill
0
118

The End.