hai this is shanthi,
is this code right? please check and correct the lines.

import javax.swing.*;
import java.awt.*;
class Flow extends JFrame
{
JButton b1,b2,b3,b4;
JPanel p;
FlowLayout FL;
Flow()
{
FL=new FlowLayout(FlowLayout.RIGHT,20,20);
b1=new JButton("button1");
b2=new JButton("button2");
b3=new JButton("button3");
b4=new JButton("button4");
p=new Jpanel();
p.add(b1);
p.add(b2);
p.add(b3);
p.add(b4);
p.set Layout(FL);
getContentPane().add(p);
setSize(400,400);
show();
}
public static void main(String args[])
{
new=Flow();
}
}

but i have an error in p.set Layout(FL); in this line.
i tryed all the ways but it showing the in this line only.
please check and correct it.

Answer Posted / vicky

"new=Flow(); "

this statement might be a wrong. u can wr8 like,

"flow f1=new flow();"

and if u got error in p.setlayout(FL) then, u wr8 following code

p.set Layout(FL=new FlowLayout(FlowLayout.RIGHT,20,20));

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

My question is in FLASH I will take 10 or 5 questions and last I will give my username and password and also I will give score to the answers which user submitted and that too the score and details of of the user should come in separate file, this entire thing should be done in Flash only. Is it possibe?

2309


Process of resolving a specific problem Problem helps to enhance your ability to live life happily. Yes, it looks stupid when somebody say something like this. But it is true. If you say, “how?” I explain how. When there is a problem in ones life, he tries to solve it. Once he solves the problem the satisfaction of solving the problem which he feels has no words. You can see it in his eyes, on his face, in his footsteps, and not the least all around where he is. So tell me, it works? So never give up in your life. Live the life with problem, because life’s other name is problem. No one on the earth saying he or she has no problem. One who does not say that I have problem but try hard to solve the problem is the person who live life happily. There are two system of solving the particular problems. One is: solve intuitively. Two is: solve systematically. From my point of view, solving the problem systematically is much easier, more balanced and logical. To solve the problem systematically there are some instruction like relaxing head for some time, think on problem and the solution. One must not mix two things together in such a way that you can not differentiate them. If essential, there should be different solutions for different problems. In solve problem systematically, one come across five types of questions or we can view it as steps to solve the problem. They are: 1 What are the sources of problem is means “establish the goal”: “To live is to have problems and to solve problems is to grow intellectually.” (J. P. Guilford) No problem exists in the absence of an objective. We need to know exactly what and where we want to arrive at in order for us to properly determine our track and direction. Knowing our direction is an important aspect in problem solving, as what Diana Ross said, “Do you know where you’re going to?” 2 What the problem is exactly means “identify and define the problem”: “Microsoft is company that manages imagination” (Bill Gates). It is definitely related to imagination i.e. asking ourselves what is the problem and to seek to understand more why we think there is the problem is recognized what caused it in order for us to get an objective. 3 What are the solutions of problem means “set your priorities”: “The best way to get a good idea is to get a lot of ideas” (Linus Pauling) Bifurcation between which solutions are “must” and which are “want” is difficult task. The solution which must be taken to solve the problem is listed out. Therefore it is said that “the only joy in the world is to begin.” (Cesare Pavese). 4. Which solution is best among all means “brainstorm for solution”: “That human mind is like a parachute – it functions better when it is open.” (Cole’s Rules) As per this narration, I can say that brainstorm for the solution to the problem is must. When you ask for the opinion of other, you can decide upon what to do and don’t. 5. What action to be taken to solve the problem means “plan your course of action”: “It is not enough to just do your best or work hard. You must know what to work on” (W. Edwards Deming). Plan your course of action with regard to the resources needed to implement the solution. In Living a Life That Matters, Harold S. Kushner (the Massachusetts rabbi whose best selling books include When Bad Things Happen to Good People) suggests that the most successful lives are the ones that most effectively manage and resolve that problem. In a nutshell, to solve the particular problem, Rene Descartes says that “It is not enough to have a good mind; the main thing is to use it well.” FIND OUT GRAMMATICAL ERROR?

5210


dear sir I want singal maintainer(iii& ii) solved question paper in every year in every board in rrb. If you collect these and sent these my mail-id i shall very grateful to you. thanking you your's faithfully soma saha

1904


Answers for Complete This Song B_C_A_A _IL K_A KA_E, S__AN J__E B__D_ J__E

2716


hi pp gurus, when i do the goods receipt through transiction MIGO the system, gives following error. I filled up all information that needs MIGO transiction. the error is: "Account determination for entry INT GBB___AUF 7900 not possible." can any one suggest me what to do now?

2262






what are the test cases for ticket vending machine?

3702


I worked with $message and $$message, Bt its not working?..

1773


If Fi account is assigned to cost element categorie poatings are not possible it is giving error that cost element has to be assigned to a co object whts the solution for this error?

2286


What is the difference between return code and completion code. When i was searching in the direct for the problem, the following errors displayed. Please can any1 explain these. Completion Code => 4 Message Id => XXDR012I Short Text => XDR field overflow. Key=SER. Len=8. Completion Code => 8 Message Id => XSQF009I Short Text => Sys call open() failed.Filename=/opt/apps/cdt3/USA/outbound/CD810O.errno=17. Completion Code => 8 Message Id => XCPR010I Short Text => Open failed for copy in OPEN_DEST_DATA. Errno=17. can you explain those 3 completion codes and also with difference between return code and completion code

10554


who have build this website?

1816


hi all, I am in the process of learning qtp. i havve windows vista in my system whenever i try to run flight reservation application , i am getting the following error "Operation must use an updateable query Fractional truncation (null) . And am unable to open Mercury tours web application due to some other error Can anyone help me please

4906


The employee runs big client-server applications and must quickly transfer large files. The company wants the best cost/benefit on this connection. What would be the most practical solution?

2334


according to class7 how can we give description on pendrive?

1977


I am Recording the QTP Script..the Script is below VbWindow("mdiPP").VbWindow("frmPOSOLocking").ActiveX ("SSTab").VbListView("lstPO").SetItemState "272 [10-11]", micChecked. After when when Run then give error property not found.

3327


Sir, I apply sbi clerk exams(07/09/09)But I did a mistake to enter my date of birth(correct 04.01.1985 / wrong 04.01.1984).please give me suggestions please. Thanking you, Bhushan.B

1644