473,700 Members | 2,619 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Relevance of jseparator.reva lidate() statement

anurag275125
79 New Member
Hello Bytes.com members.....

I write a swing program that automatically re-size the separator. But I didn't understand the significance of jseparator.reva lidate() line in the code.
here is the code..........

Expand|Select|Wrap|Line Numbers
  1. import java.awt.*;
  2. import java.awt.event.*;
  3. import javax.swing.*;
  4. /* <applet
  5. code=resize_separator.class
  6. width=600
  7. height=600
  8. >
  9. </applet> */
  10. public class resize_separator extends JApplet implements ComponentListener
  11. {
  12.     JSeparator js=new JSeparator(JSeparator.VERTICAL);
  13.     Dimension d=js.getPreferredSize();
  14.     public void init()
  15.     {
  16.         Container c=getContentPane();
  17.         c.setLayout(new FlowLayout());
  18.         c.add(new JTextField("Hello from swing!",30));
  19.         c.add(js);
  20.         c.add(new JTextField("Hello from swing!",30));
  21.         addComponentListener(this);
  22.     }
  23.     public void componentShown(ComponentEvent e)
  24.     {
  25.         js.setPreferredSize(new Dimension(d.width,getSize().height));
  26.         js.revalidate();       // please explain the line
  27.     }
  28.     public void componentResized(ComponentEvent e)
  29.     {
  30.         js.setPreferredSize(new Dimension(d.width,getSize().height));
  31.         js.revalidate();
  32.     }
  33.     public void componentMoved(ComponentEvent e){}
  34.     public void componentHidden(ComponentEvent e){}
  35. }
  36.  
can you please explain the statement??

thanks....
Feb 15 '10 #1
0 943

Sign in to post your reply or Sign up for a free account.

Similar topics

1
2668
by: ap49 | last post by:
Hi, I've just started to implement a FULLTEXT search script in PHP. I have read that the relevance rating should not directly be used to create a rating (as a percentage say) for the results you may return to a user. Is there an effective algorithm whereby some normalisation etc. could effectively be used to provide at least a "rough" guide?
1
1943
by: Hal Halloway | last post by:
How do I change a MYSQL Fulltext relevance value to: 0 to 100%. I'm just thinking about usability for the "average" user - maybe they would like to know...and would not understand the raw value. Any snips, ideas or links appreciated. Thanks
0
1326
by: ap49 | last post by:
Hi, I've just started to implement a FULLTEXT search script in PHP. I have read that the relevance rating should not directly be used to create a rating (as a percentage say) for the results you may return to a user. Is there an effective algorithm whereby some normalisation etc. could effectively be used to provide at least a "rough" guide?
0
1308
by: Hal Halloway | last post by:
How do I change a MYSQL Fulltext relevance value to: 0 to 100%. I'm just thinking about usability for the "average" user - maybe they would like to know...and would not understand the raw value. Any snips, ideas or links appreciated. Thanks
1
6169
by: leegold | last post by:
Given the SQL shouldn't the records be sorting by score ie. relevance? I thought if "WHERE MATCH" is used it will sort that way. Thanks mysql> SELECT `page`.`title` , MATCH ( `title` , `descrip` ) AGAINST ( '+code+nasdac' IN BOOLEAN MODE ) AS SCORE FROM `page` WHERE MATCH ( `title` , `descrip` ) AGAINST ( '+code+nasdac' IN BOOLEAN MODE ); +---------------------------------------------+-----------------+ | title | SCORE |...
1
2447
by: leegold | last post by:
Show full header Is there any way to make relevance when using boolean mode more useful? If not, are there plans in the Fulltext development "todo" for making it useful? I'm thinking of just counting the keyword occurences in records with a PHP script somehow and using that to order the records somehow. Or doing a non boolean fulltext search w/relevance first and then melding that in somehow with a boolean search. See my results...
10
1331
by: Merrill & Michele | last post by:
Elsethread is a discussion of identifiers. How many times have you had to wipe out a HD and start over. I just thought of a way to keep gcc running all the time here, but I've forgotten my abra cadabras over the years. I need the statments for autoexec.bat and config.sys in order to load mscdex.exe. (I know the question in its sheer temerity looks OT. Give me a little rope. MPJ
10
8007
by: Vinod I | last post by:
Hi Team, I just want to know, wat is the relevance /or benefit of using "_" before a variable. i.e., if I use a variable as "_MyVariable", wat benefit I am going to achieve than just using "MyVariable". Thanks in advance.
7
5264
gregerly
by: gregerly | last post by:
Hello, I've got a problem with a website search function. PHP for the front end, MySQL for the backend. The search function searches a field of keywords. The problem I'm having is that when someone searches for "Italian Food" it's bring back results for other resteraunts that are not italian, but do have the word Food in their keywords. Is there a way of adding relevance to a search, in a way that would make sense for the above senario? ...
1
1595
by: ojsimon | last post by:
Hi I Am using Simplepie to display some rss feeds, currently it displays them in date and time order but i want it to display them in relevance order by using a usort function. here is the code for the page <?php /******************************************************************** MULTIFEEDS TEST PAGE Nothing too exciting here. Just a sample page that demos integrated Multifeeds support as well as cached favicons and perhaps a...
0
8712
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8639
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9203
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9058
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8911
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7794
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6555
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4649
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2375
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.