How to read and use an API ?

Hi all,
In the Java Tutorial - Nested Classes chapter, one of the questions at the end is like this:
Q2. Use the Java API documentation for the Box class (in the javax.swing package) to help you answer the following questions.
a. What +{color:#3366ff}static nested class{color}+ does Box define?
b. What +{color:#993366}inner class{color}+ does Box define?
c. What is the +{color:#ff6600}superclass{color}+ of Box’s inner class?
d. Which of Box’s {color:#003300}+nested classes+{color} can you use from any class?
e. How do you create +{color:#ff0000}an instance of Box’s Filler class?+
+{color}+
{color:#000000}I can figure out the answers from a - d. But I don't understand the answers for e.
{color}{color:#008000}
Answer 2e: {color}new Box.Filler(minDimension, prefDimension, maxDimension)
Where do we find the answers for (minDimension, prefDimension, maxDimension)? Is it written in the API? We can't actually see the programming codes in an API, right?
Thank you for your reply.
{color:#ffff00}
Cheers~
++{color}
Edited by: elaine_g on 16-Jul-2008 10:18 AM

JoachimSauer wrote:
If you look at the JavaDoc for the [Box.Filler constructor|http://java.sun.com/javase/6/docs/api/javax/swing/Box.Filler.html#Box.Filler(java.awt.Dimension,%20java.awt.Dimension,%20java.awt.Dimension)], then you'll see that it takes 3 Dimension objects.
Thank you! I was looking at the constructor of the wrong class - 'Class Box' instead of 'Class Box.Filler', no wonder I couldn't find it. :p Thx. :-)
DrLaszloJamf wrote:
The Filler constructor takes three dimensions objects, right?
Dimension minDimension = ...
Dimension prefDimension= ...
Dimension maxDimension= ...
Box.Filler filler = new Box.Filler(minDimension, prefDimension, maxDimension);That's it. Nothing more involved or mysterious.Thanks a lot for the code, I can visualize it better now.
P/S: Well, it was pretty mysterious for a while. 'Twas the very first time I've ever seen an API. ;-)
Cheers~

Similar Messages

  • How to read and upload microsoft word file into database using forms9i

    Hi,
    How to read and upload microsoft word file into oracle database using forms9i. I appretiate if anyone can send me example or atleast a sujjetion.
    Thanks in advance
    Mahesh Ragineni

    The webutil package includes the ability up upload from the client to the database. See otn.oracle.com/products/forms and click on webutil for more details.
    Regards
    Grant Ronald
    Forms Product Management

  • How to read and then extract HTMl source code using java program?

    Hi,
    Could someone tell me how to read and then extract the content of certain tag from html source code. For example, given url http://.... , I would like to know what the <Title> content <Title> in that page is.
    Any help is greatly appreciate.

    Use a URLConnection to make the connection to the page at the needed URL. From the URLConnection, you can get an InputStream that is the stream of data from that page. Just search through the stream and find the <title> tags (don't forget to check for case sensitivity).

  • How to create and use dynamic queue in JMS

    Plz tell me how to create and use a dynamic queue in jms and can reciever file lookup it as it lookup any server configurred queue(written in the server).

    Hi,
    We can use Azure File services to do this, for more information, please have a look at this article:
    http://blogs.msdn.com/b/windowsazurestorage/archive/2014/05/12/introducing-microsoft-azure-file-service.aspx. The Azure File service exposes file shares using the standard SMB 2.1 protocol. Applications running in Azure can now easily share files between
    VMs using standard and familiar file system APIs like ReadFile and WriteFile.
    Best Regards,
    Jambor
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to integrate and configure SMS API CC&B

    Hi All,
    Can you just guide me how to integrate and configure SMS API in CC&B.as per my knowledge sending email from ccb is possible but i was not able to find how SMS application can be implemented in CC&B.it very vital in my project to send SMS alert from CC&B to end users and also let me know can we customise and configure third party vendor SMS API in CC&B which was developed in various technologies or we have to develop our own SMS API for application
    Thanks,
    Srinivas Varadarajan

    There is no built in application for SMS in CCB you need a third party application.
    One of our partner company has a readymade add on module with complete GUI interface for CCB, this application allows you to define rules and conditions using standard select statements to filter receipent for SMS. This application can work with any service provider all you need is a SMS gateway. If you do not have a SMS gateway the same can be provided in certain countries.

  • If user disable cookie how to set and use session with URL Rewritting

    if user disable cookie how to set and use session with URL Rewritting by append session ID in url

    If cookies are disabled, then app server will automatically try to use URL rewriting for session control. Programmer's responsibility is to encode any links or redirects using
    response.encodeURL("/yourPage.jsp")
    and
    response.encodeRedirectURL("/yourPage.jsp")
    See API for details
    http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/http/HttpServletResponse.html#encodeURL(java.lang.String))

  • How to read and update the value of property file

    Hi,
    I am not able read the values from property file.
    Please tell me how to read and update the values from property file using Properties class
    This is my property file : - Config.properties its located in D:\newfolder
    Values
    SMTP = localhost
    Now i need to change the value of the SMTP
    New value :
    SMTP =10.60.1.9
    Pls Help me
    Thanks
    Merlin Rosina,

    Post a small (<1 page) example program that forum members can copy and run that demonstrates your problem.

  • How to read and write a string into a txt.file

    Hi, I am now using BEA Workshop for Weblogic Platform version10. I am using J2EE is my programming language. The problem I encounter is as the above title; how to read and write a string into a txt.file with a specific root directory? Do you have any sample codes to reference?
    I hope someone can answer my question as soon as possible
    Thank you very much.

    Accessing the file system directly from a web app is a bad idea for several reasons. See http://weblogs.java.net/blog/simongbrown/archive/2003/10/file_access_in.html for a great discussion of the topic.
    On Weblogic there seems to be two ways to access files. First, use a File T3 connector from the console. Second, use java.net.URL with the file: protocol. The T3File object has been deprecated and suggests:
    Deprecated in WebLogic Server 6.1. Use java.net.URL.openConnection() instead.
    Edited by: m0smith on Mar 12, 2008 5:18 PM

  • How to create and use mutable array of UInt8

    Hello!
    If I get it right, UInt8 *buffer, buffer - is a pointer to a start of array?
    Then how to create and use mutable array of UInt8 pointers?
    The main target is a creation of the module that will store some byte array requests and will send all of them at the propriate moment.

    I try
    - (void) scheduleRequest:(UInt8 *)request {
    if (!scheduledRequests) scheduledRequests = [[NSMutableArray array] retain];
    [scheduledRequests addObject:request];
    But get warning:"passing argument 1 of 'addObject:' from incompatible pointer type"

  • HOW TO CREATE  and  USE EVENTS IN WORKFLOWS .

    HOW TO CREATE  and  USE EVENTS IN WORKFLOWS with the help of classes.
    What i am doing is..
    open se24
    event tab->event name->parameters
    method tab->method name->event handler->copy parameters
    interface tab->if_workflow->enter
    tell me what else to do step by step
    Another important thing is that HOW to use these class events to trigger the workflows.
    REPLY ASAP
    THXS IN ADVANCE

    Hi,
    Pl. see this blog...
    Raising ABAP OO events for workflow
    Regards,
    JOy.

  • Need help how to install and use html db

    plz any body can help me i have download htmldb2.0 and want to install and use it with oracle but i do not know how to install and use it first time any body can help me in detail .
    Niazi

    Niazi,
    Included in the 2.0 download are some very comprehensive Installation and Upgrade instructions, I would highly recommend you read those.

  • Formication : How to install and use it

    Hi,
    I need some help. I would like to install and use the Formication CGI but I don't find any documentation usable for someone who never installed any CGI
    Does someone use it and can teach me how to install and use it ? Or maybe there is a documentation somewhere ?
    Thanks for any help

    >I thought it was something well known here.
    I'd never heard of it before.
    Find here the message from the Mac OS X Server Mailing list where I found it.
    Hi all..
    We are currently moving: from WebStar / Lasso 6.x / FMS 5.5 to
    Mac OSX Server / Apache / Lasso.850 / FMSA 8.
    On our WebStar webserver we used FlexMail to handle e-mails sent from a
    html-form, unless we wanted databases/Lasso to get involved.
    I understand FlexMail cannot be used on Apache so I have been looking around
    and searched the list for any tool to do the same job.
    --> What tool to send e-mails directly from web-forms
    with a reasonable option to format the e-mail and
    generate a response page.
    Henning, most of the people that transition from WebSTAR to iTools Apache use Formication.
    Formication is a Perl version of Flexmail, so it has all the features of Flexmail, plus more. It was designed by one of the developers of the original Flexmail.
    When you convert from WebSTAR to Apache you can keep your script intact.
    With iTools, all you need to do is to add the action:
    Flexmail /cgi-bin/formication.pl
    and the .flx handler,
    and the scripts run unchanged.
    >I also found that there is an invisible file
    inside. It's a .htaccess file
    I'd totally missed that, and it's likely to be the
    critical link.
    yes... I supposed it was something important but.... well hidden...
    By default, as shipped by Apple, .htaccess files are
    ignored. You need to explicity enable then in
    /etc/httpd/httpd.conf
    Both 'Action' and 'AddHandler' (the two directives in
    the .htaccess file) require FileInfo override for the
    directory. Therefore, at the very least you need to
    add:
    <pre class=command><Directory /path/to/your/form>
    AllowOverride FileInfo
    Directory></pre>
    to your httpd.conf so that apache will read the
    .htacess file.
    Alternatively, since you have to edit httpd.conf
    anyway, you might just want to add those directives
    to the <Directory> block, which will save Apache
    having to read the file each time the form is used.
    Thanks a lot Camelot,

  • How to setup and use Passbook on iPhone 4?

    How to setup and use Passbook on iPhone 4?

    So your saying you can only copy part of this text?

  • How to install and use icloud in imac windows 7 based

    How to install and use icloud in imac windows 7 based

    Have you carefully read iCloud - Learn how to set up iCloud & iCloud on a Mac?, What do I need? If you are trying to run on Windows 7 on your iMac and ignoring OS X well you're pretty much on your own. You would need to look for supports on Windows forums. If you happen to use BootCamp there is a Bootcamp forum that you can post on for BootCamp and Windows assistance.

  • How to read and write a data from extrenal file

    Hi..
    How to read and write a data from extrenal file using Pl/sql?
    Is it possible from Dyanamic Sql or any other way?
    Reagards
    Raju

    utl_file
    Re: How to Create text(dat) file.
    Message was edited by:
    jeneesh

Maybe you are looking for

  • Multiple Apple ID's tied to one iTunes account

    We have three people with Apple devices in the house: My MacBook Pro & older iPod, my daughter's iPod Touch & iPhone and my wife's iPhone and (not yet set up) Mac Mini. We all have Apple ID's, but am wondering how to tie them to my iTunes account so

  • Ipod not syncing video files?

    When I try to sync a video file Itunes crashes and Windows says it's stopped working. It is a relatively large video file, but theres plenty of space? Whats wrong? Update: I tried to sync a small video file and it got right to the end of the progress

  • Filesharing, ftp protocol

    Hey everyone im trying to set up an ftp out of the file sharing property. I've selected the file sharing on, checked ftp. When i go to the ftp adress it gives me it says, "You don't have permission to view "Macintosh HD".". I was wondering if anyone

  • Where do I find host info for a Muse site hosted on BC?

    I created a Muse site a while back, and just added new stuff tothe site. When I went to upload to FTP all of the host info was blank. Where do I find this information so that I can upload updates?

  • Socket in Palm OS with MIDP

    Hallo, Has anyone create a Socket with MIDP ? If I execute Connector.open("socket://MyServer:32123"); I receive a IOException without any message. What make I wrong? Volker