32,204 Topics

Member Avatar for
Member Avatar for seanbp

The server only does the basics. TODOs: The header method needs expanding. The file send method can't handle too large files. Maybe write custom buffer class since some buffering is done. Keep cache of recent files.

Member Avatar for JamesCherrill
0
1K
Member Avatar for ankit.pandey3

Hi Friends I want to convert "Mon Oct 28 11:30:58 GMT+05:30 2013" Format to "2012-11-27T18:08:47.410+05" in Java. I dont know how to do it. Please help. Thanks in advance

Member Avatar for stultuske
0
209
Member Avatar for armani05

Hi just wondering if anyone can advise why this is not working and offer a solution, I am new to java. Thanks in advance for any help. Print Pattern Feature The “print pattern” feature should function as follows: The user should be prompted to enter the following input values: ! …

Member Avatar for stultuske
0
360
Member Avatar for ZombieKnight93

I have to create a quadrilateral program for school where you put in two points and find the area. For the Public double getArea() part it says "return type double is not compatible with void" How do I fix it? Main class public class Point { double x; double y; …

Member Avatar for Schol-R-LEA
0
635
Member Avatar for kay19

Hello. Just learned about hashmap a week ago. My code can add an Employee's name/id/performance scale based on user input. I allow the user to also remove an employee by allowing user to input name/id to remove. However, when the user prints out sorted last name, the name the user …

Member Avatar for kay19
0
149
Member Avatar for chdboy

I have this code which saves the value into database from JSpinner SpinnerListModel monthModel = new SpinnerListModel(); String[] monthStrings = {"1Month","3Month","6Month","1Year"}; //get month names monthModel = new SpinnerListModel(monthStrings); JSpinner spinner = new JSpinner(monthModel); statement.setString(28,(String)monthModel.getValue().toString().toUpperCase()); But how to get that value back for Editing? I tried spinner.setText((String)monthModel.getValue(),29); But it says The …

Member Avatar for Seldar
0
516
Member Avatar for AODfan

Hi all, I am having an issue with getting my Jbuttons and JComboBox alignment properly in the JPanel. I have tried changing the coordinates of the GridLayout around to try to satisfy, but they are working properly. I am trying to get my radio buttons to the far right and …

Member Avatar for chdboy
0
625
Member Avatar for andrewriebel

Hello, all. The following is a problem I'm currently working on. I can't get it to run like the problem asks. Any help would be greatly appreciated.

Member Avatar for JamesCherrill
0
155
Member Avatar for chdboy

When I click on Button which fetch records from the database it works fine public void fetchrecords() throws SQLException { Statement stmt = null; String query = "select * from Employer where Fileno=1"; try { stmt = con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE); rs = stmt.executeQuery(query); while (rs.next()) { firstNameTextField.setText(rs.getString(2)); lastNameTextField.setText(rs.getString(3)); addressTextField.setText(rs.getString(4)); //and more records. …

Member Avatar for chdboy
0
196
Member Avatar for YumnaZia

I dont understand why the image isnt appearing! please help.. import javax.swing.*; import java.awt.*; //import java.awt.event.*; public class level2 extends JFrame{ Container con= getContentPane(); ImageIcon bg= new ImageIcon("D:\\Raptor\\background3.jpg"); JLabel back= new JLabel(bg); level2(){ setDefaultCloseOperation(EXIT_ON_CLOSE); setLayout(null); setSize(1300,700); back.setBounds(0,0,500,500); con.add(back); setVisible(true); } public static void main(String[] args) { new level2(); } }

Member Avatar for Seldar
0
99
Member Avatar for wakz_1

I have created a linked list and I wish for the user to enter a Station and then the output is the number stored for that station. LinkedList myList = new LinkedList(); myList.addFirst("London", 5); myList.addNode("Manchester ", 10); myList.addNode("Liverpool", 20); myList .addNode("Birmingham", 50); This is the input for the user to …

Member Avatar for rubberman
0
1K
Member Avatar for ARC.1

Write a Java program which adds all numbers that are multiples of either 7 or 9 up to 600. Ensure that numbers like 63 are added only once in the sum. Thanks for help

Member Avatar for Seldar
0
141
Member Avatar for sweetdame22

My assignment is to create a program that asks the user what they want to do: 1-add a member, 2-delete a member, 3-see the arraylist of members, or 4- exit. I have the menu popping up, but I can't get it to go back to the menu after I execute …

Member Avatar for Seldar
0
208
Member Avatar for praom2104

Hello, I am trying to execute a jar file with higher version of jdk. But it fails & the worst part is I am not getting any error message. Jar file compiled verison: jdk 1.5 Executed version: jdk 1.7 I assume the jar file is downward compatible. thoughts pls? Thanks! …

Member Avatar for praom2104
0
274
Member Avatar for Violet_82

Hi all, I wonder if you can help me with this. I am looking at a fairly long (well at least for me) java program, about 700 lines. Basically it's a very very basic simulation of an ATM that can run on a computer. Now, in all the classes I …

Member Avatar for Violet_82
0
159
Member Avatar for rithish

i want to get text from console screen for example System.out.println("hello"); i want to get that "hello" and store it in string how to do that?????

Member Avatar for stultuske
0
176
Member Avatar for anisha.silva

Hi, not sure if this the correct thread to post this question. I am working with the eclipse plugin project to creat and editor. And I want to highlish certain words for the editor. I was researching and found have to use syntax coloring. I didnt get a good tutorial …

0
111
Member Avatar for anestistsoukalis

I think that my problem is quite easy to be solved by hard coders like you :-) Its a conversion of binary number to decimal and hexadecimal. I cannot find why i am keep having errors in my two classes. Here is the code: **Main :** public class Times { …

Member Avatar for JamesCherrill
0
164
Member Avatar for murali2489

Hi Team, I have been trying to understand the concept of RMI by writing a simple classes for 1. RMIInterface 2. RMIServer 3. RMI Client I have written three classes in eclipse and started RMIRegistry by running start rmiregistry command. When i tried to compile RMI server class im getting …

Member Avatar for JamesCherrill
0
406
Member Avatar for ronaldpaul

Hi, I would like to load the data from a SOAP response XML file to a MySQL table. Sample SOAP XML would be http://data.gov.in/sites/default/files/Ashgourd_2012.xml. I have to write a program to populate the data. I'm not very familiar with Java Web Services. I've worked with Struts2 and basics of Spring. …

Member Avatar for ronaldpaul
0
729
Member Avatar for chdboy

I have a String which has been splitted like this String companyinforstring ="Company name.:Company profile no 1.:Company profile no 2.:Company profile no3.:---------------------------------------------------------------:Company address, :Street number, :Area,Area no2, :City. "; for (String retval: companyinforstring.split(":")) { System.out.println(retval); graphics.drawString(retval.toUpperCase(), 250, 200); } The Problem is that String which has been splitted, overlaping each …

Member Avatar for chdboy
0
197
Member Avatar for smith ww

hi, i dont know how to solve it can you help me please??? Create a java program that will do the following: # read 3 inputs from the keyboard # • two input numbers each being a single digit (0…9) • one character representing one of five operations : + …

Member Avatar for JamesCherrill
0
140
Member Avatar for feafnae

I have to fix programme where the programme asks the user for an input of a random text. When the text is written in the programme will change specific letters like a to be c so I am a man would be I cm c mcn public static void main(String[] …

Member Avatar for JamesCherrill
0
177
Member Avatar for shwetakharat84
Member Avatar for flpips

My interactive educational software has applets embedded in webpages. All was fine until I installed the latest Java7. Now all the applets are blocked, with some comment about my security settings being responsible for the blockage. I've tried everything I know to no avail. How do I get my applets …

Member Avatar for JamesCherrill
0
88
Member Avatar for chdboy

I'm not able to get the printout. here is the code public class Billing extends Frame implements ActionListener,Printable { JButton printbtn = new JButton("Print"); } public int print(Graphics graphics, PageFormat pageFormat, int pageIndex) throws PrinterException { if (pageIndex > 0) { return NO_SUCH_PAGE; } // User (0,0) is typically outside …

Member Avatar for JamesCherrill
0
303
Member Avatar for javaprog200

Hello, The program below has two JPanels. The first JPanel, panel contains the labels, buttons and combobox. The second JPanel, panel_1 has the image.I am using BoxLayout to line up the belows vertically. The issue I am having is when I run the program, the compoments of the panel do …

Member Avatar for JamesCherrill
0
280
Member Avatar for cakka

Hello, I got a homework. This is too difficult to me. Because, I have just learned about the introduction of Java Networking. I still didn't get a enough material about Java Networking programming. This is the task that I got: [https://dl.dropboxusercontent.com/u/61841244/CS1103%20-%20T1%202013-2014_%20Lab%2011%20Unit%207.pdf](https://dl.dropboxusercontent.com/u/61841244/CS1103%20-%20T1%202013-2014_%20Lab%2011%20Unit%207.pdf) This is my question : - what is the …

Member Avatar for stultuske
0
180
Member Avatar for Neon Tetras

I want to execute WordPad using the code below. It runs fine on my pc. But failed to run on other pcs. String program = "C:\\Program Files\\Windows NT\\Accessories\\wordpad"; String file = "srcFiles\\Resources\\readme.rtf"; //This is the path to the file i want to open with wordpad. Runtime load = Runtime.getRuntime();; try{ …

Member Avatar for djslavens
0
192
Member Avatar for Chris_16

Hi This app is supposed to let a person draw depending on their choice of Shapes and color. I cant figure out what is going wrong. The colours and shapes barely work and the mouse position is not showing up at all. Mouse listener that tracks mouse position seems to …

Member Avatar for Chris_16
0
317

The End.