32,206 Topics
| |
how to create a database in Ms Access and connecting it to forms that is created using swings in java using Netbeans 5.5.... can u please explain me with an example in netbeans 5.5 please | |
can anyone help me look over my code? The Course class A Course object should store the department, course number, and course title. It should have linked lists of prerequisites and "subsequents" (the courses for which this course is a prerequisite). The constructor should construct a course given a department, … | |
public class Test { public static void main(String[] args) { int max = 0; max(1, 2, max); System.out.println(max); } public ststic void max( int value1, int value2, int max) { if (value1 > value2) max = value1; else max = value2; } } | |
Hello I am trying to get to a Component On a JInternalFrame. I have a reference to the frame on the frame there is a panel. on the panel there is a JTabbedPane. to add a tab to the JTabbedPane I need to reference the Pane. Is there a way … | |
Hi, I have a javaproblem that I just can't solve. "Write a [B]recursive[/B] method who returns the largest value in an array with the signature: [CODE]public int max(int[] v)[/CODE] (Hint: If you need to, use a private help-method) It would be easy if it was allowed to change the signature … | |
hi everyone. my name is chris..i am new to javw pogramming i just have the feelings that i can get what i hv been looking for here.. i startd reading java sometimes ago and i got chocked whn i got to evnt handling... i relly wantto be a java pogrammer..i … | |
hi, i am creating a small program for an assignment to store and retrieve information from a database. I have created arraylists to add and retrieve the data. just wondering if i am going about it the right way. One of the problems is that when the information is displayed … | |
[CODE] public void mouseClicked(MouseEvent e) { store clickedStore = null; for (int i = 0; i < stores.length; i++) { if (stores[i].isClicked(e.getX(), e.getY())) { clickedStore = stores[i]; break; } } } [/CODE] Is it possible to display the result of the above loop as a string? I have tried various … | |
plzz help me........... i want to list all the sub directories,files(including subdirectory files) in a particular drive(C,D,E,etc). | |
I keep getting a"Can't find symbol" error and code will not compile. Assignment already late and need help ASAP. [CODE]//Inventory Program Part 3 //IT215 week 6 class Inventory { String itemNumber; //stores item number String name; //stores name int stockQuantity; //stores quanity in stock double pricePerunit; //stores price String departmentName;//Department … | |
Hi, I am having a problem in using radio checkbox to change the color of a graph. The main Idea was to add checkboxes to a graph and also add different shapes to the graph code which was given. The code I tried is the following : [code]import java.applet.*; import … | |
Hi guys, I really need some help with this, I've spent hours looking for a solution. I have 4 classes of which 2 are important right now. 1. The user enters his username in the JTextField userF, if I print that userF.getText() in the class where userF is created I … | |
i creeat a jar file,i used system.out.println to display records on screen.but the problem when i click on jar file nothing is displayed.it is displayed only when i am opening command prompt and entering java name of file.so result is displayed on console (msdos) but i want result to be … | |
[code]public class Test { public static method1(int n, m){ n += m; method2(3.4); } public static int method2(int n){ if (n > 0)return 1; else if (n == 0) return 0; else if (n < 0) return -1; } }[/code] | |
[CODE]public static Integer calcs(String postFix) { StackInterface<Character> stack = new LinkedStack<Character>(); // instantiate Character stack Integer result = new Integer(0); Node<Integer> num1, num2; Integer int1 = new Integer(0); // declare address to each variable object Integer int2 = new Integer(0); num1 = new Node<Integer>(int1, null); num2 = new Node<Integer>(int2, null); … | |
Hello, Is it possible for anyone to explain to me what "Initialize the 3 parallel arrays" means? Here is the problem. A file called seats.txt contains a description of an airline seating arrangement and a list of individual seat assignments. An example is shown here: rows 7 leftSeats 1 rightSeats … | |
[code] import java.awt.*; import java.awt.event.*; import java.sql.*; import javax.swing.*; import java.util.*; public class attendance extends JFrame implements ItemListener, ActionListener { static Connection con; static Statement stmt; static ResultSet rs; static ResultSetMetaData rsMeta; String query; String ref="",rollno=""; String[] heads; int[] stChange; String[][] cubeData; int rows, cols, coo; public attendance(String tit, String … | |
Dear All I am a newbie Java Learner.I try to learn over Java API Docs.But still I need some help. I have a gui which consist of four textfields(tf1,tf2,tf3,tf4) and a button(b1). If I press the button(b1)"Register", I want my action write whole textfield sources into a text.txt file by … | |
Hai, I am new java developer. Now i am doing one struts application. In my application, at the User registration time, i need to Encrypt the password field and then i like to store into the database. After that the same user will be logging, at the moment the database … | |
Hi! The problem is connected with using frame.pack(). So, let's say there is JFrame: frame. Depending on the option selected from JComboBox, the content and size of JFrame should change. Everything works perfectly in NetBeans (!!!). However, if I try to run the JAR file, then the size of JFrame … | |
Hello, I am trying to create an IRC server. The thing is that I dont want this server to run on "localhost", I want to connect this server to other upstream IRC servers. I dont know how to do that. I.E. I want this server to connect to smth.hostname.com on … | |
I wrote a simple HelloWorld programe looks like something this: import javax.swing.JOptionPane; public class HelloWorld { public static void main(String [] args) { JOptionPane.showMessageDialog(null, "Welcome"); } } ----------------------------------------------------------- In this simple java programe which in not an applet I just want to print the "Welcome" message in some other fonts … | |
My code is : [CODE] public final class Pixels{ BufferedImage img=null; public int w,h; public Pixels(){ try { // Read from a file File file = new File("1.jpg"); img = javax.imageio.ImageIO.read(file); } catch (IOException e) { } } public void checkfunction(){ h=img.getHeight(); // errorpoint w=img.getWidth(); } [/CODE] Errors: Exception in … | |
I'm trying to implement a gap sort which is a bubble sort that instead of comparing neighboring elements to sort a list, it compares elements 'i' positions apart. I can get the sort to execute the loop once, but I can't figure out how to make my program continue looping … | |
| Hi I wrote a litle code to calculate factorial, but when I compile it, it says " ';' expected " (In the " for ") Here is my code : [CODE] /** * A class to calculate factorial of a number * * @author Barth * @version 10/29/10 */ public … |
HTTP Status 500 - -------------------------------------------------------------------------------- type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception org.apache.jasper.JasperException: File "/WEB-INF/struts-html.tld" not found org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:51) org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:409) org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:116) org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:160) org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:430) org.apache.jasper.compiler.Parser.parseDirective(Parser.java:499) org.apache.jasper.compiler.Parser.parseElements(Parser.java:1558) org.apache.jasper.compiler.Parser.parse(Parser.java:130) org.apache.jasper.compiler.ParserController.doParse(ParserController.java:245) org.apache.jasper.compiler.ParserController.parse(ParserController.java:101) org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:176) org.apache.jasper.compiler.Compiler.compile(Compiler.java:317) org.apache.jasper.compiler.Compiler.compile(Compiler.java:298) org.apache.jasper.compiler.Compiler.compile(Compiler.java:286) org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:565) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:309) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:308) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:259) javax.servlet.http.HttpServlet.service(HttpServlet.java:729) note … | |
HTTP STATUS 500 PLEASE HELP ME description The server encountered an internal error () that prevented it from fulfilling this request. exception org.apache.jasper.JasperException org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:372) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) root cause java.lang.NullPointerException org.apache.jsp.janki.bsal_005fsearchresult_jsp._jspService(bsal_005fsearchresult_jsp.java:107) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) note The full stack trace of the root cause is available in the … | |
[CODE=JAVA] setFoo(getFoo() + 1); ... private int foo; public synchronized int getFoo() { return foo; } public synchronized void setFoo(int f) { foo = f; } [/CODE] Easy code for a race condition. Easy solution: [CODE=JAVA] synchronize(o){ o.setFoo(o.getFoo() + 1); } ... private int foo; public synchronized int getFoo() { … | |
I have wrote a simple java programe whose code is as fallow: [code] import javax.swing.JOptionPane; public class HelloWorld { public static void main(String [] args) { JOptionPane.showMessageDialog(null, "Welcome"); } } [/code] ------------------------------------------------------ Now I just want that the message "Welcome" to print in differnet size and color. Please help me … | |
i want to make my java project with Jmonkey, is it easier than using eclipse alone? |
The End.