Sartaj Syed

Greenhorn
+ Follow
since Nov 11, 2001
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Sartaj Syed

I have a windows Me Operating system. I have j2sdk1.4.1_01 and j2sdkee1.3.1 installed . I have path variable set to their respective bin directories. However j2ee server does not run . It starts and immediately stops. I need immediate help please.
17 years ago
I am an SCJP. I downloaded j2sdk1.4.1_01 as C:\j2sdk1.4.1_01 I downloaded j2sdkee1.4 as C:\j2sdkee1.4 . I set the path to include the bin directories from both the directories. I set Java_Home variable and J2EE_Home variable respectively. I do not have any classpath set.
I copied a CaseStudy application called CreateAgency source file, compiled file, and a Bat file from a CD Rom (that came with J2ee in 21 days book) Drive to the Coudscape subdirectory of j2ee.
The book instructs to run the application CreateAgency from the Cloudscape directory. When I do this I keep getting classdef not found error.
This happens whether I run the bat file or use java -classpath .;CreateAgency . Please help
Here's the code:

[ January 26, 2002: Message edited by: Jim Yingst ]
18 years ago
Buttons defined in the constructor of a frame which is the main screen of the program don't work. There are two other frames that are registered as ActionListerners with these buttons and are defined as two separate static inner classes within the public class of the file . The source code compiles and runs with the main screen being displayed. However when the buttons are clicked they do nothing. Please any suggestions.
18 years ago
Cindy , the lower part of the feedback code did not paste, that is why you are seeing the open bracket.
18 years ago
When I compile the following code I get 2 errors saying : unable to resolve symbol input and feedback at th if source == statements. input and feedback are Buttons previously defined in the constructor code.

(edited by Cindy to format code - and yes - the if statement just ENDS with the open bracket - ???)
[ January 24, 2002: Message edited by: Cindy Glass ]
18 years ago
I have three files all of which are compiling.
One of them is a main screen with two buttons one when clicked should access the second file (an input screen) and when the second is clicked it should access the third file(a feedback screen) . I am unable to link them . What is the best way to do this. the code for the main file is as follows

(edited by Cindy to format code)
[ January 24, 2002: Message edited by: Cindy Glass ]
18 years ago
Thanks Ian that solved my problem as far as compilation goes.
I need some more help . This particular code was like the main screen of my application . I want to use one button to open up another screen called Input screen and the second button to open up a feedback screen. I have the code for Input in an Input class ( in the same file) and the code(everything compiles). for Feedback in a feedback class. How do I do this?
As of now the main screen has these buttons but clicking them the action performed method does just a print statement.
18 years ago
I am having some problem with the following code. Please help

import java.awt.*;
import java.awt.AWTEvent;
public class TS1 extends Frame {
TS1(){
super("Project Development Coordination System");
setSize(500,500);
setLayout(new BorderLayout());

//Build and add 1st Panel of TS1
Panel p1 = new Panel(new BorderLayout());
TextField Title = new TextField();
Title.setFont(new Font("Sansserif", Font.BOLD, 48));
Title.setText("HORNSONIC");
Title.setEditable(false);
TextField Name = new TextField();
Name.setFont(new Font("Sansserif", Font.BOLD, 30));
Name.setText("Hera International, Inc.");
Name.setEditable(false);
p1.add(Title, BorderLayout.NORTH);
p1.add(Name, BorderLayout.CENTER);
add(p1, BorderLayout.NORTH);
//Build and add 2nd Panel
Panel PDCS = new Panel();
TextField pdcs = new TextField();
pdcs.setFont(new Font("Sanserif", Font.BOLD, 22));
pdcs.setText("Project Development Coordination System");
pdcs.setEditable(false);
PDCS.add(pdcs);
Button input = new Button("INPUT");
input.addActionListener(new In ());
PDCS.add(input);
Button feedback = new Button("FEEDBACK");
feedback.addActionListener(new Feed());
PDCS.add(feedback);
add(PDCS, BorderLayout.CENTER);

//class In
class In implements ActionListener{
public void actionPerformed(ActionEvent ae){
System.out.println("In");}}
// class Feed
class Feed implements ActionListener{
public void actionPerformed(ActionEvent AE){
System.out.println("Feed");}}
The compilation errors I am gettin says cannot resolve symbol ActionListener. and ActionEvent
18 years ago
I use JEdit that saves all files as .java.
18 years ago
When I try to compile the following file Iget the error message Cannot read. It does not seem to be a path problem as other files in the same directory are compiling,
import java.awt.*;
public class FS1 extends Frame{
FS1(){
super("Feedback");
setSize(500,500);
//Build and add Panel3.
Panel p3 = new Panel();
Label L1 = new Label("Project Continued on Revision #");
TextField T1 = new Textfield);
T1.setBackground(Color.grey);
T1.setEditable(true);
p3.add(L1);
p3.add(T1);
add(p3, BorderLayout.SOUTH);
}
}
public static void main(string args[]){
FS1 fs = new FS1();
fs.setvisible(true);
}}
18 years ago
When I run the following code I just see an empy frame no text. Please explain why?

[ January 14, 2002: Message edited by: Cindy Glass ]
18 years ago

Originally posted by sonir shah:
hi.
Congrats .good score.
I am appearing for SCJP next month.could u please share with me your experience of giving the exam.Frankly speaking I am not good at the concepts.so could u please give me some suggestions.At present I am referring RHE and have the JQ+.Do you think these 2 options will help me to get good score in the exam.Please reply.
Sonir


My study experience is as follows: The RHE is the best bet bookwise. Mock exams that helped me in the beginning to assess myself was Marcus Green 1,2, 3. Javaquestionbank.com is also very helpful. Jxam JQPlus are good simulators. Later on you should do 1, 2, 3 of javaworld.com by Sun Gugiono. I am not sure if my web address is correct but if you do the search on java world you should be able to find it. It had good explanation for the answers.
My real exam had a lot of questions on I/O and threads . So concentrate on that.
18 years ago
Hi Everyone,
After six months of studying for the exam without any prior java experience ( I am a C programmer) I passed the exam yesterday with 74% I am happy but would like to know how you all rate the score. Thanks to all the moderators who replied and solved my problems.):
18 years ago
A non static inner class cannot have static members except for compile time constants like static final var = var1.
Is this correct? Please clarify