32,205 Topics

Member Avatar for
Member Avatar for gedas

Hey Guys, Could someone guide me o show examples of how i can hit a url and find whether its dead or alive, well simply i want to monitor couple of sites incase they go down so if the site is returning me holding page or any other error i …

Member Avatar for JamesCherrill
0
84
Member Avatar for lucrativeu

***To upload and stream did not work on google chrome and firefox using an https but worked on internet explorer, why?***

0
45
Member Avatar for GeekTool

I use a book to learn Java ,and this book contains making a difference question in each end of the chapters. I finished chapter 5, which is all about if and switch statements and operands such as bitwise and logical and loops. Now, it asks me to create a quiz …

Member Avatar for stultuske
0
132
Member Avatar for Onlineshade

public class NewClass { public static void main(String[] args){ int[] a=null; int p=0; int i=0; while(p<11){ a[i]=p; p++; i++; } } } what is wrong here.....here the array can not store data.

Member Avatar for stultuske
0
119
Member Avatar for spowel4

If I have an arraylist of arrays (each item in the arraylist is itself a one-dimensional array), how can I iterate over each element of each array contained in the arraylist?

Member Avatar for JamesCherrill
0
218
Member Avatar for london-G

Hello, Basically I am planning to develop a database system for a school. There will be three subsystems 1. The teachers (add, remove, edit) 2. The students(add, remove, edit) 3. The classes( add, remove, edit) as an interactive timetable. I am planning to use java(netbeans) and would like to hear …

Member Avatar for anand01
0
105
Member Avatar for GeekTool

In this code i did not understand something. In one class, a variable is declared as private, but then this value is used in another class. import java.awt.Graphics; import javax.swing.JPanel; public class DrawRect extends JPanel { private int choice; //user's choice of which shape to draw. public DrawRect (int userChoice){ …

Member Avatar for GeekTool
0
126
Member Avatar for GeekTool

> I have asked this question before, but i think i could not totally understand the diffefence between bitwise and logical operands. According to the book i am using to learn java, the bitwise operands can change the value and this is described as side effect. Also, in bitwise operands, …

Member Avatar for GeekTool
0
127
Member Avatar for soham.m17

I have a panel(JPanel) and it has FlowLayout by default. It has no preferredsize. I have a JScrollPane. So When I am adding buttons to the panel, the buttons are horizontally added. I want that to be added vertically. panel = new JPanel(); JButton clearButton = new JButton("CLEAR"); panel.add(button); JScrollPane …

Member Avatar for JamesCherrill
0
133
Member Avatar for Johannady2

It compiles but my JButton won't work... when i run the applet and press the Exit button.. it just prints some errors(or i dunno what they are) in the black window that opens when you run the applet. import java.awt.event.*; import javax.swing.*; import java.awt.*; import java.awt.event.*; ; public class CheckRadioTest …

Member Avatar for Johannady2
0
252
Member Avatar for Johannady2

This only does either BOLD or ITALIC... import java.awt.event.*; import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.applet.*; public class CheckRadioTest extends JApplet implements ItemListener { //private String CurrentComboName = "Select One"; private JLabel headingLabel; private int currentStyle = Font.PLAIN; //private int intBold = Font.PLAIN; //private int intItalic = Font.PLAIN; private …

Member Avatar for NormR1
0
2K
Member Avatar for Johannady2

I tried to convert this GUI to a JApplet but then I get the error message. > D:\JAVA\PROGRAMS\whiteboard\whiteBoardapplet.java:9: error: whiteBoardapplet is not abstract and does not override abstract method actionPerformed(ActionEvent) in ActionListener > public class whiteBoardapplet extends JApplet implements ActionListener > ^ > 1 error > > Tool completed with …

Member Avatar for Johannady2
0
184
Member Avatar for Johannady2

This is a JApplet. the Radio Buttons for colos work.. why won't the Checkboxes work? import java.awt.event.*; import javax.swing.*; import java.awt.*; public class CheckRadioTest extends JApplet implements ItemListener { //private String CurrentComboName = "Select One"; private int currentStyle = Font.PLAIN; //private int intBold = Font.PLAIN; //private int intItalic = Font.PLAIN; …

Member Avatar for Johannady2
0
194
Member Avatar for sciwizeh

I'm working on a Graph based Image editor. My current plan is to have Nodes of the graph be operations on the image, an operation will take a number of input buffers and manipulate them in some way (be it invert a single input, composite two inputs, draw a rectangle …

Member Avatar for ~s.o.s~
0
172
Member Avatar for rajesh1158

In the below code, I want to know the significance of 10 while creating a PrioriyQueue. I know its the initial capacity but what does it mean?? I replace 10 with any positive number and the output remains same. import java.util.*; class Test { static class PQsort implements Comparator<Integer> { …

Member Avatar for JamesCherrill
0
199
Member Avatar for lilym

I am new to Regex... I need to split by "|&|" -- three characters in that exact order. For example, **"abc|&|e&f**" should return *"abc"* and *"e&f"*. I tried string.split("|&|") , but it return all single characters.

Member Avatar for NormR1
0
53
Member Avatar for MoMule

I wrote a class called Creature.java that creates a random creature object with various body stats. The Creature class extends MonsterGUI. I used Netbeans to create a new jFrame form, called MonsterGUI.java to create a GUI to display the creature objects' stats using jLabels. In MonsterGUI I have a private …

Member Avatar for MoMule
0
1K
Member Avatar for SuperManofBC

public void compareStrings() This method will prompt the user to type two strings and will put them into different String variables. Then it will compare those strings to see if they are the same, i.e. have the same letters in the same order. If the strings are the same, “same” …

Member Avatar for SuperManofBC
0
208
Member Avatar for Valiantangel

Just need some understanding on the various Prime number calculations.Please explain 1. verify by brute force that a number is evenly divisible only by 1 and itself.(dont implement the Sieve of Eratosthenes algorithm) 2. writing and running the program with upper limits of n/2 and the square root of n. …

Member Avatar for TrustyTony
0
120
Member Avatar for mehnihma

I am trying to cast vector to a string players = (Vector<Player>) inStream.readObject(); And I get error: java.lang.ClassCastException: java.util.Vector cannot be cast to java.lang.String Can someone tell me is there a way to do it? Thanks

Member Avatar for mehnihma
0
526
Member Avatar for warpstar

Hello, java noob here, in the code below, why is it when declaring a class that '<E>' is used in stead of the brackets ? '(E)'?? public class LLStack**<E>** implements Stack<E>{ private Node**<E> **head ; public LLStack ( ){ head = nul l ;} //creates an empty stack public boolean …

Member Avatar for anand01
0
106
Member Avatar for zina_a

hi, I have installed the IIS FTP server in my PC and I want to monitor this server with the SNMP protocol ,I have searched in mib files and I didn't found any information concerning this server,is there any other way to monitor a server programatecly and thanks.

0
83
Member Avatar for peter_budo

Simple code to see if array of primitives has duplicates. The aim is to only check if there are any duplicates, but not to check what element is repeated, or its position etc. PS: Do you know some handy snippet? Don't way, post it!

Member Avatar for odoepner
4
965
Member Avatar for sciwizeh

So this is mainly a Design/Clean Coding sort of question, I know I've read something about this previously but I can't find it, I believe it's in one of my reference books on C/C++ so it wouldn't likely be useful to my predicament. This question includes a lot of Java …

Member Avatar for sciwizeh
0
250
Member Avatar for speakon

Hello, I need to create a JDBC that connects to a mySQL database, retrieves the data from a table and displays it into a JTable. I have done this successfully, but have ran into a problem. The initial values I entered into the database (for testing) are permament. If I …

Member Avatar for speakon
0
371
Member Avatar for libathos

I was wondering how is it possible to receive a "key-pressed" event in Java even when my program is in background.

Member Avatar for Majestics
0
64
Member Avatar for ocw91

i having trouble adding the JSeparator into GUI. It just won't come out =( i write it like this, but nothing happen... JSeparator separator = new JSeparator(SwingConstants.HORIZONTAL); pane.add(separator);

Member Avatar for NormR1
0
70
Member Avatar for natri1991

Everyone watch my code and help me. I'm building a simple program like Paint the windows. Here, I just do the free drawing button. But when I press the button and draw freehand drawing, then the panel draw the toolbar to copy the image above and press a button every …

Member Avatar for NormR1
0
421
Member Avatar for TIM_M_91

OK so what would I need to change to the following code so it would produce the following: xxx xoo xoo As at the moment it is producing: xxxooo xxxooo xxxooo My code that I have used can be seen below: import javax.swing.*; public class test { public static void …

Member Avatar for wen_cai
0
99
Member Avatar for koolhawk

Im creating a Chess game. Im stuck at getting the pieces to move within the rules Aka bishop can only move diagonally. I Create Panels - 64 of them within a lager panel then add JLabels - The pieces - into those panels ` JLabel bb = new JLabel(new ImageIcon("bb.gif")); …

Member Avatar for NormR1
0
211

The End.