Win a copy of Spring Boot in Practice this week in the Spring forum!

Rao Kuna

Greenhorn
+ Follow
since May 07, 2000
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 Rao Kuna

It is defenetly preferable to use init method than constructor in Applets. Constructor also works but it is not reliable in some cases and for details, you better go to "sun online tutorial --> subject "Applets".
Thanks
Rao

Originally posted by Kavita Ghia:
Hello friends,
I am really keen to know in what way constructors are advantageous to use then the init() method.And if they are not advantageous then why do people use it.Anyone out there please
reply as can't think of its usefullness.Maybe somewhere i am
overlooking certain point.
Regards,
Kavita.


21 years ago
Hi Peter
Thanks for the reply. Infact, yestarday surprisingly, I got the same idea and gave the same solution. If the browser is Netscape, increased X and Y co-ordinates dynamically and it worked fine.
But I know that the solution is not a proper one and I was wondering how people are handling this problem. One thing, I noticed is Netscape's font size is bigger than IE's font size even for the same font. May be that is the reason, Netscape takes more space to print.
Anyway, I can live with this solution for now.
Once again, thanks for the reply.
Rao Kuna

Originally posted by Peter Gragert:
I came across the same problem.
One (bad) workaround was: make the 'boundingbox' greater than
necessary: width=500 if it was 400 e.g. (same with height)
and check if it worked (was sufficient bigger)


21 years ago
Hi
Can any one suggest what is the best way to print applets from browsers.
Thanks in advance

Rao
21 years ago
There is a simple java script function available for this, "navigator.appName" --> gives browser name.

Originally posted by Brain Tenner:
Is there a function to get the browser (by name)?
Thanks!


21 years ago
Yes, constructor is called first followed by init method. In applets it is preffered to put the "initial" code in init() method rather than in constructor. The reason is, applet generally not gauranteed for full environment until its init method is executed. Take for example, loading big images, which may not properly load and available for applet if they are loaded in constructor instead of init method.
Also, execution of init is faster than constructor. Hope, it clears your question.

Originally posted by Kavita Ghia:
Hi,
I have two doubts in mind about constructors and init() method-
1)Since all th initialization is normally done in the init()
method then what is the advantage of having a parameterless
constructor? Normally I do no have any constructor in my applets.
Infact I was under the impression that u cannot have constructors
in the applet untill I saw an applet with the constructor.
There certain variable were declared in init() and others in
a constructor.Wonder Why? .
2)Since the applet works perfectly fine with the constructor I am convinced that one can have a constructor in the applet.This leads to another question which one is called first init() or
constructor.If init() is called first then when is the constructor called?Rather which is the place/rank of the constructor in the life cycle of an applet.
init()=>start()=>paint()=>stop()=>destroy()
Where is constructor?
Please....... clarify.
Thanx in advance.
Best Regards,
Kavita.


21 years ago
Hi
I am having a problem of printing a Java Applet (using AWT) in Netscape browsers (4.7.x). The applet is printing fine in IE 5/ AOL 5 etc, but in Netscape it is cutting at the right side and full applet is not being printed.
Can anyone give me a solution, how to solve this problem for Netscape browsers ?
Your help is greatley appreciated.
Thanks
Rao
21 years ago
1. Any ASC file but with similar format of data.
2. Yes, no data validation is required and all fields are of type String (look at Data.Class)
3. Yes it is a stand alone program and will run separately from command line.
4. U should use Data.class to build the Binary File
Rao
Ben
I think, I should agree with U. "Control Scheme" is a part of MVC (model-view-control) design only and JTable's abstract model include MVC design. As U said, It would be better idea to document the decison.

Originally posted by Ben Nichols:
I'm fairly certain that using a swing Jtable and its corresponding abstracts to build the GUI covers the MVC thing. I couldn't tell you why but I do recall having looked into it. What I don't understand is the phrase 'control scheme' and whether it applies to the MVC thing or whether it transcends java.


I was looking at RHE book and the topic, other Design Issues also say about we need to use some kind of Design Pattern like MVC. I was earlier thinking JTable implementation alone can meet MVC requirements but what else can be included ? It would be better if anyone who already cleared the exam can give us feedback.
Thanks
Rao
Hi Ben
I have a question regarding the UI you have developed.
Did U implemented specifically and design pattern like MVC for UI. If yes, did U use all swing components with their respective model interfaces ? By reading about the UI requirements, I feel we need to have UI with a separate control scheme, so that the future expansions will not get effected. What do U say ?
Rao

Networking Choice - networking decision is rmi, because it takes less code to implement, and is easier to debug
Search Algorithm - Search algorithm searches database in <code>O(cn)</code> time for multiple field matches where
<code>c</code> is the number fields being searched, and <code>n</code> is the number of records.
This is as efficient as possible without building index tables into the database for every field possibly searched.

Expectation of future functionality enhancements - the GUI was built to dynamically build itself around the
current contents of the database. This will allow the GUI to interface with server-side changes to the database and its
schema seamlessly. GUI actions are implemented through dialog boxes, and menu items. If a new version of the GUI with more
actions is developed the way the user uses it will not change significantly.
[/B]
Hi
If U want know, what Developer Exam contains, U can visit sun web site, 'javasoft.com'->developer connection --> certification.
This exam has 2 parts, One assignment (155 marks - total) and a writen test (to make sure that U have done the project). Both assignment and exam will be evaluated together and the result is 80% marks (combined for both exams) - with Pass/Fail.
The assignment typically contains, GUI development with Swing components, Data Conversion tool, Networking & RMI, Database design with record locking and Thread saftey. Since, U need to understand all topics very clearly, one single book can not cover any subjet in depth, but U can have books on each topic now a days and also can look at Sun - online documentation.

Originally posted by priyavardheesh:
Hi every body,
I just finished SCJP and am planning to prepare for developer exam, don't know any thing of what this exam contains. Please help me out giving the syllabus, links where i can get some material and mock exams. Thank you all in advance
regds
priya


The database binary file will have 2 components, one metadata and rest records. The metadata will be in binary format as U will be using writeUTF and writeInt methods (look at 2nd Data constructer).
Rao

Originally posted by romagol:
As part of the exam, there is a data conversion tool that reads the flat ASCII data file and creates a binary file for use by suncertify.db.Data class.
Does anyone know what this binary file should look like?
In my understanding it is still text file just with extra information ( feild names, record lengths, etc. )
thanks in advance for your help
Roman.


U mean, while creating database bin file, we need to create the instance of FieldInfo object like:
new FieldInfo("Flight Name", 40) where 40 indicates the maximum length of the field "Flight Name" in bytes ?
Thanks
Rao

Originally posted by Ben Nichols:
The Length is in characters, which the Data.class stores as bytes. For the record number, you're on your own. There are comments in the Data.class file (under the find method) that suggest record number is the first field.


Ben
Thanks very much. I have couple of questions which I could not come to conclusion.
1. What is the length attribute in FieldInfo object ? Is it length of the field in Bytes or length of the field in chars ? I am thinking it should be bytes but how can we define the length of the string field in bytes ?
2. Do we need add Record Number to the record details given in the ascii file.
Thanks

Originally posted by Ben Nichols:
The Data.class is designed to support any sort of database using text-only fields. My convert utility does not validate data, because the database does not have field types (i.e. char, int, string, date/time...). My requirements state that the convert utility should be easy to reuse for other projects. To me this means if you want to import a address book, or flat file ascii database of plane replacement parts, your convert utility should be able to handle it. Validating data is not possible unless the database supports field types, and the user is able to match imported fields to existing field types during the import process. For an easy to command-line utility, this would be very difficult. Note: (Paraphrase) The dataset may be modified for a clearly justified reason, and such changes should be kept to a minimum. (End Paraphrase) I took this blurb from the requirements to mean that one probably had to make modifications to the dataset to meet the requirements.