Displaying the contents of an array of objects

Hello All,
My Java teacher gave us a challenge and I'm stumped. The teacher wants us to display the contents of the array in the main menthod. The original code is as follows:
public class TestObjects
     public static void main ( String args[] )
          Thing[] thingArray = { new Thing(4), new Thing(7) };
}I understand that the elements of the array are objects, and each one has a value assigned to it. The following code was my first attempt at a solution:
public class TestObjects
     public static void main ( String args[] )
          Thing[] thingArray = { new Thing(4), new Thing(7) };
                                for ( int i = 0; i < thingArray.length; i++)
                                   System.out.println( thingArray );                         
}To which I'm given what amounts to garbage output. I learned from reading about that output that its basically displaying the memory location of the array, and the the contents of the array. There was mention of overriding or bypassing a method in System.out.println, but I don't believe that we're that far advanced yet. Any thoughts? I know I have to get at the data fields in the objects of the array, but i'm not having an easy time figuring it out. Thanks very much in advance!

robrom78 wrote:
public class TestObjects
     public static void main ( String args[] )
          Thing[] thingArray = { new Thing(4), new Thing(7) };
for ( int i = 0; i < thingArray.length; i++)
System.out.println( thingArray );                         
Note that you're trying to print the entire array at every loop iteration. That's probably not what you meant to do.
You probably meant to do something more like
                             System.out.println( thingArray[i] );Also, note that the java.util.Arrays class has a toString method that might be useful.
To which I'm given what amounts to garbage output. It's not garbage. It's the default output to toString() for arrays, which is in fact the toString() defined for java.lang.Object (and inherited by arrays).
I learned from reading about that output that its basically displaying the memory location of the array, and the the contents of the array.It displays a default result that is vaguely related to the memory, but probably shouldn't be thought of us such. Think of it as identifying the type of object, and a value that differentiates it from other objects of the same type.
By the way I assume you mean "+not+ the contents of the array" above. If so, that is correct.
There was mention of overriding or bypassing a method in System.out.println, but I don't believe that we're that far advanced yet. Any thoughts? No, you don't override a method in println; actually methods don't contain other methods directly. You probably do need to override toString in Thing.
I know I have to get at the data fields in the objects of the array, but i'm not having an easy time figuring it out. You can get to the individual objects in the array just by dereferencing it, as I showed you above.
But I suspect that won't be sufficient. Most likely, Thing doesn't have a toString method defined. This means that you'll end up with very similar output, but it will say "Thing" instead of "[Thing" and the numbers to the right of the "@" will be different.
You'll need to override the toString() method in Thing to get the output you want.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

Similar Messages

  • How to display the contents of an array list to a listview?

    Hi. How do I display the contents of an arraylist to a listview?
    Here is my current code:
    var c: Control= new Control();
    var simpleList: ArrayList = c.ListResult; //ListResult is an ArrayList containing strings
    var simpleListView : ListView = ListView {
            translateX: 0
            translateY: 0
            layoutX: 20
            layoutY: 80
            height: 130
            width: 200
            items: bind simpleList;
    Stage {
        title: "Trial app"
        width: 240
        height: 320
        style: StageStyle.TRANSPARENT
        scene: Scene {
            content: [ simpleListView
    } [http://img341.imageshack.us/img341/133/listview.jpg]
    My code generates the result in this screenshot above. It shows that all the contents on the arraylist is displayed in one row/item.
    It should be displayed as (see bottom image) ...
    [http://img707.imageshack.us/img707/3745/listview1.jpg]
    Do you guys have any idea on this? Thank you very much for your replies

    For your listbox data to bind the listbox requires a Sequence. This is something that you can sort out at the entrypoint of your code.
    In the example below I have used an ArrayList to simmulate the data you have entering your FX code, but then I put that list into a Sequence, in your case instead of having an ArrayList in your FX code, you simple supply the list on entry, as I have marked in the following code.
    * Main.fx
    * Created on 12-Feb-2010, 10:24:46
    package uselists;
    import javafx.stage.Stage;
    import javafx.scene.Scene;
    import javafx.scene.text.Text;
    import javafx.scene.text.Font;
    import java.util.ArrayList;
    import javafx.scene.control.ListView;
    import javafx.animation.Timeline;
    import javafx.animation.KeyFrame;
    * @author robert
    //Simmulate your data with an ArrayList
    var simpleList: ArrayList = new ArrayList;
    simpleList.add("Hello");
    simpleList.add("World");
    // *** This is what your entry point would become, just load the simpleList.toArray() into your sequence ***
    var simpleSequence = [];
    simpleSequence = simpleList.toArray();
    //after some time add some items, to show that our binding is working
    Timeline {
        repeatCount: 1
        keyFrames: [
            KeyFrame {
                time: 5s
                canSkip: true
                action: function () {
                    //you can work on the Sequence to add or remove
                    insert "Another item" into simpleSequence;
                    //if you at some point want to have your array reflect the changes
                    //then perform your changes on that too
                    simpleList.add("Another item");
                    //remember depending on your app
                    //you may keep the update of simpleList
                    //until you are finished with this view and do it in a single update
            KeyFrame {
                time: 10s
                action: function () {
                    //Alternatly, to keep your ArrayList correct at all times
                    //add items to it and then update your Sequence
                    simpleList.add("Added to array");
                    simpleSequence = simpleList.toArray();
    }.play();
    Stage {
        title: "Application title"
        scene: Scene {
            width: 250
            height: 80
            content: [
                ListView {
                    items: bind simpleSequence
    }You can bind to a function rather than the data, which I am sure would be needed some cases, for example if the listBox data was a named part of a hash value for example, all that is required is that your function returns a sequence.

  • How to display the contents of a 2D array which is bound to a data table

    Hi ,
    I have a backing bean which returns me a 2D array of Strings . Now I have bound this to a data table .
    Something like this
    <h:dataTable styleClass="dataTable" id="dstable" var="dbArray" value="#{pc_MyApp.dbProperties}">
    Now when I say dbArray[i] it will give me the ith column of the current row. I want to display these dbArray[i] contents in a proper table format.
    What I am doing at present is something like this
    <h:dataTable styleClass="dataTable" id="dstable" var="dbArray" value="#{pc_MyApp.dbProperties}">
    <h:column id=id1>
    <h:facet name="header">
    <h:outputText value="Heading"/>
    </h:facet>
    <h:outputText id="text1" value="#{dbArray[0]}" ></h:outputText>
    <h:outputText id="text1" value="#{dbArray[1]}" ></h:outputText>
    <h:outputText id="text1" value="#{dbArray[2]}" ></h:outputText>
    </h:column>
    </h:dataTable>
    This is able to display the contents of 2D array on the screen, but everything for the current row comes in just a single column...I want each column value to be in diff column and it should look like a table.
    Can anyone please guide me in this respect..
    Thanks
    Mahajan

    Does doArray always have at most three elements?
    If so, you can specify three <h:column>s each displays doArray.

  • Is it possible to display the content of complex mutlidimensional datastructures (e.g. std::vectors (dim = 2) of (non-primitive) types) in Xcode debugger?

    Hi,
    First, let me say that I like Xcode and coding in OS X. However, there is something I miss:
    Let me demonstrate what i mean:
    This is the representation of a 2D-Vector in Xcode Debugging environment:
    v          'std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >'          [{...}]
    0          'std::vector<int, std::allocator<int> >'          [{...}]
    1          'std::vector<int, std::allocator<int> >'          [{...}]
    2          'std::vector<int, std::allocator<int> >'          [{...}]
    3          'std::vector<int, std::allocator<int> >'          [{...}]
    4          'std::vector<int, std::allocator<int> >'          [{...}]
    5          'std::vector<int, std::allocator<int> >'          [{...}]
    6          'std::vector<int, std::allocator<int> >'          [{...}]
    7          'std::vector<int, std::allocator<int> >'          [{...}]
    8          'std::vector<int, std::allocator<int> >'          [{...}]
    So, the above representation is what I would call bad (even useless).
    The problem is that the current Linux Kernel (3.1.1) has some problems with the new MBA 2011 (which is really sad) so I can not show you the representation of a 2D-Vector in Qt-Creator for Linux right now (I'm not sure if the Qt-Creator for OS X could display the content properly, since I've never tried it). But you can believe me, that the represantation would look something like the one in Eclipse (which would be a good representation).
    So my question: is there a "fix" for this?

    What you want is a custom data formatter. I would give you some links, but my iPad wants to convert them into the documentation viewer.
    You aren't going to find much help with C++ debugging. While Apple's Clang has made great improvements in C++ support compared to GCC, C++ is really not something that Mac or iOS programmers typically use. The Cocoa containers and objects are so much more versatile. You kind of have to have a masochist streak and a 7 year development schedule to use C++. C++ is experiencing a bit of a resurgence, especially in defense markets. For a long time, compilers had such poor support for C++ that it just wasn't possible. After simplifying the language a little, compilers can now compile and link C++. Consultants have realized they can provide C++ services and burn though billable hours better than any other language on the market. Independent developer, however, don't have those schedules and budgets so they tend to use NSArray. Xcode supports it better in the debugg and, chances are, you don't need to debug it anyway. There are a number of matrix classes built on Cocoa.

  • How to display the content of a BLOB column in a ADF/BC pages ?

    How to display the content of a BLOB column in a ADF/BC pages ?
    There is some image in database table blog column. And we want to display image on the screeen.
    There is some example about upload and dowload blog columns.
    (steve not yet document example page etc...)
    But We want to display blog picture in a image component...
    is there any basic way to do it ?
    Thanks a lot...

    Ali,
    You could just download the sample app... but... here is the servlet code from the demo (look at it just for technique - you'll obviously have to change it for your needs)...
    John
    package oracle.fodemo.storefront.servlet;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.OutputStream;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import oracle.jbo.ApplicationModule;
    import oracle.jbo.Key;
    import oracle.jbo.Row;
    import oracle.jbo.ViewObject;
    import oracle.jbo.client.Configuration;
    import oracle.jbo.domain.BlobDomain;
    import oracle.jbo.domain.DBSequence;
    import oracle.jbo.domain.Number;
    import oracle.jbo.server.ViewObjectImpl;
    public class ImageServlet
      extends HttpServlet
      private static final String CONTENT_TYPE =
        "image/jpg; charset=windows-1252";
      public void init(ServletConfig config)
        throws ServletException
        super.init(config);
      public void doGet(HttpServletRequest request,
                        HttpServletResponse response)
        throws ServletException, IOException
        response.setContentType(CONTENT_TYPE);
        response.setContentType(CONTENT_TYPE);
        String detailProductId = request.getParameter("detail");
        String thumbnailProductId = request.getParameter("thumbnail");
        boolean thumbnail = true;
        String productId = null;
        OutputStream os = response.getOutputStream();
        String amDef = "oracle.fodemo.storefront.store.service.StoreServiceAM";
        String config = "StoreServiceAMLocal";
        ApplicationModule am =
          Configuration.createRootApplicationModule(amDef, config);
        ViewObjectImpl vo =
          (ViewObjectImpl) am.findViewObject("ProductImages"); // get view object (the same as used in the table)
        if (detailProductId != null)
          productId = detailProductId;
          thumbnail = false;
        else
          productId = thumbnailProductId;
        vo.defineNamedWhereClauseParam("paramThumbnail", null, null);
        vo.defineNamedWhereClauseParam("paramProductId", null, null);
        vo.setWhereClause("DEFAULT_VIEW_FLAG = :paramThumbnail AND PRODUCT_ID = :paramProductId");
        vo.setNamedWhereClauseParam("paramThumbnail", (thumbnail? "Y": "N"));
        vo.setNamedWhereClauseParam("paramProductId", productId);
        vo.executeQuery();
        Row product = vo.first();
        BlobDomain image = (BlobDomain) product.getAttribute("Image");
        InputStream is = image.getInputStream();
        // copy blob to output
        byte[] buffer = new byte[10 * 1024];
        int nread;
        while ((nread = is.read(buffer)) != -1)
          os.write(buffer, 0, nread);
        os.close();
        vo.setWhereClause(null);
        vo.removeNamedWhereClauseParam("paramProductId");
        vo.removeNamedWhereClauseParam("paramThumbnail");
        Configuration.releaseRootApplicationModule(am, false);
    }

  • Display the content of a text file in a browser

    I am new to servlet, I have written a java servlet code which can read a file and display its content in command prompt only(resin),i would like to ask how can i display the content on the browser and i also want to ask how to write a servlet which can display the conetent from a web browser( e.g. whatever i type in a form) and produce the result in the text file.
    import java.io.FileReader;
    import java.io.IOException;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class read extends HttpServlet
    public void doGet (HttpServletRequest request,
    HttpServletResponse response)
    throws ServletException, IOException
    String applicationPath =
         getServletContext().getRealPath ("");
    String filePath =
         getServletContext().getRealPath ("/WEB-INF/text.txt");
    FileReader fr = new FileReader (filePath);
    for (int chr = fr.read(); chr != -1; chr = fr.read())
    System.out.print ((char) chr);
    }

    You have to create an object of PrintWriter and use that to display the output on the browser.
    PrintWriter out = response.getWriter();
    out.println(chr);
    Hope this helps..
    Arun

  • How to display the contents of the database values which are retrived.

    how to display the contents of the database values which are retrived in servlets and i am able to display the contents in the servlets and if forward to jsp using requestdespatcher,the values are to be shown in jsp one below the other.please suggest me in these........the servlet code is as shown
    while(rs.next()){
                        buffer.append(rs.getString(1));
                        buffer.append(rs.getString(2));
                        buffer.append(rs.getString(3));
                        buffer.append(rs.getString(4));
                        buffer.append(rs.getString(5));
                        buffer.append(rs.getString(6));
                        buffer.append(rs.getString(7));
                        buffer.append(rs.getString(8));
                        buffer.append(rs.getString(9));
                        buffer.append(rs.getString(10));
                        request.setAttribute("result1",buffer);
                        RequestDispatcher rq=request.getRequestDispatcher("/results.jsp");
                        rq.forward(request,response);
    in jsp iam using the getAttribute to retrieve the values as shown
    <% StringBuffer sb=(StringBuffer)request.getAttribute("result1"); %>
    <%= sb %>
    but getting the results in the stretch,i need to display the result one below the other.

    if you load it all into the buffer that is going to be very difficult. I would suggest loading it into some sort of collection. I like using an ArrayList.
    Then pass the arraylist.
    you will then on the jsp iterate through the arrayList using what every you want.. el, logic tags, scriplets.
    so something like
    ArrayList arrayList = new ArrayList();
    while(rs.next()){
    arrayList.append(rs.getString(1));
    //or possibly an arrayList of String arrays
    //maybe using nested for loops.  Inner for loop adds result to string[] then //outer adds string[] to arrayList.
    //can be done any number of ways based on your expected result set.

  • How do I display the contents of a folder?

    I am creating a technical resource CD including many
    different kinds of media.
    One such area is support files. These are several files that
    customer might want to copy to a directory on there hardrive. I do
    not want them to have to click on and save each file.
    I have added a folder and files in the baggage file area.
    How do I create a Hyperlink (or some other kind of object)
    that when clicked on lauches Explorer displaying the contents of
    the baggage folder? It does not matter if it is a frame or if its a
    pop-up.
    Any help would be greatly appreciated.

    Here's a thought:
    You want the user to see a directory -- i.e., Contents -- of
    the separate volume, and you're looking for a way to open Windows
    Explorer.
    I would merge everything into a WebHelp package or CHM on the
    CD. The main TOC functions as a substitute for the Windows
    directory tree.
    I guess you don't want to go to the trouble of merging all
    that stuff into a WebHelp or chm package.
    Rather than trying to open a directory in Windows Explorer,
    open a new browser window with a single .htm file showing text
    links that mirror the Windows explorer directory.
    To keep it simple, you could list folder names and indent the
    contents, simulating an expanded TOC.
    Make it more complicated by having one htm file with all
    directories closed, and another file for each directory, expanded
    to show contents. A "back" link, in effect, goes up the directory
    tree. For a little more trouble, if you have, say, six
    sub-directories, make their surrogate TOC pages identical, with
    closed directories, except the relevant one is expanded. Clicking
    the base of another "folder" is, in effect, going up the tree.
    How you distinguish between a CD holding the bonus material
    vs. a directory on the hard drive, I'm not sure. Maybe the original
    link would have an option: Go to the bonus on a CD, or go to the
    bonus on the local drive.
    Perhaps it's not what you're looking for, or too much
    trouble. Just tossing out an idea that you could refine or reject.
    Harvey

  • Can you print the contents of an array?

    I am building a chat program and what to be able to show who is online, i simply want to display the contents of the name array to the text area as this is how i send and recieve the usernames.
    I thought the names array may contain all the names and therefore can be printed to the textarea.
    is this possible and what command do i use if so?
    thank you

    To print part of the list (assuming they are in the
    first slots, and all nulls are at the end):
    System.out.println(Arrays.asList(arrayOfStrings)
    .subList(0, numberOfNames));
    many thanks, this has helped alot!
    the only problem i am now facing is that i have done it via RMI and every time i send a message the person who sends the message becomes added to the list again, for example i end up with a long list like:
    online = sun, sun, sun, sun, sun
    when there is only one sun! this list increases every time a message is sent!
    i only want the name there once!
    and also on the first sending there is no value in the array, starts off [ ] when sun is online.
    thanks

  • Displaying the contents of internal table- in email Step of workflows

    Hello Folks,
    I wanted to display the contents of an internal table ( would contain a list of opportunites ), in an email sent throught the workflow:
    My idea was to LOOP AT <ITAB> into <WA> from an external program and then call the workflow for each content of the <WA>. This will be a problem as, if there are like 1000 records in the internal table, then workflows will be called 1000 times...sending 1000 emails..
    My requirement is that we need to send a single email to the single person, displaying the content of the internal table in the email body......
    My question
    1) Is this scenario possible through worflows ?
    2) If not, please provide an alternative ..
    Thanks
    Anand

    Do you mean to say that just by inserting the multiline element
    within the body of the 'Send email' step type, the contents
    of the multiline element is displayed automatically without
    we having to loop at it somehow ?
    Follow the below apporach,
    1. First create a multiline container element in the workflow conatiner.
    2. Populate the internla table , by using the bor methods and pass back the populated ITAB to the WF by using the binding concept.
    3. Now create a mail step in the workflow, you have the option of inserting the workflow container elements into the mail conten, so insert the multiline container element , then it prompts to select the option like a) Do you liek to display only first line b) Display the ITAB line by line c) Display ITAB lines continuously with out line break.
    4. based upon the requirement select any one of the options.
    Note: Make sure the line length of the ITAB won't excced 132 charecters, because the send mail step will consider only 132 characters.

  • Displaying the content of one JPanel in an other as a scaled image

    Hi,
    I'd like to display the content of one JPanel scaled in a second JPanel.
    The first JPanel holds a graph that could be edited in this JPanel. But unfortunately the graph is usually to big to have a full overview over the whole graph and is embeded in a JScrollPanel. So the second JPanel should be some kind of an overview window that shows the whole graph scaled to fit to this window and some kind of outline around the current section displayed by the JScrollPanel. How could I do this?
    Many thanks in advance.
    Best,
    Marc.

    Hi,
    I'd like to display the content of one JPanel scaled
    in a second JPanel.
    The first JPanel holds a graph that could be edited
    in this JPanel. But unfortunately the graph is
    usually to big to have a full overview over the whole
    graph and is embeded in a JScrollPanel. So the second
    JPanel should be some kind of an overview window that
    shows the whole graph scaled to fit to this window
    and some kind of outline around the current section
    displayed by the JScrollPanel. How could I do this?
    Many thanks in advance.
    Best,
    Marc.if panel1 is the graph and panel2 is the overview, override the paintComponent method in panel2 with this
    public void paintComponent(Graphics g) {
    Graphics2D g2 = (Graphics2D) g;
    g2.scale(...,...);
    panel1.paint(g2);
    }

  • How can I update a Site Column with the content of an array with javascript CSOM?

    I'm relative new to Sharepoint 2013, I'm trying to update the content of a Site column with the content of an array, I can retrieve and visualize the content of my site column, the user is able to change and save the necessary part and the changes are
    saved into an array, now I have to update the content of the site column with the content of the array, but for some kind of reasons I can't accomplish that, any suggestion/example? This is my code so far to retrieve, visualize the site column and store the
    mofication into my array.
        <body>
                <select id="dropdown" name="dropdown" onchange="optSelect()">
                    <option value="EngineType_Cylinders">EngineType_Cylinders</option>
                    <option value="EngineType_EngineCycle">EngineType_EngineCycle</option>
                    <option value="EngineType_EngineFamily">EngineType_EngineFamily</option>
                    <option value="EngineType_Euro">EngineType_Euro</option>
                    <option value="EngineType_FamilyEvolution">EngineType_FamilyEvolution</option>
                    <option value="EngineType_GasEmissionLevel">EngineType_GasEmissionLevel</option>
                    <option value="EngineType_Power">EngineType_Power</option>
                    <option value="EngineType_PowerSupply">EngineType_PowerSupply</option>
                    <option value="EngineType_Use">EngineType_Use</option>
                </select><br />
                <textarea id="textareadisplay" rows="25" cols="23"></textarea><br />
                <input type ="button" value="Update values" onclick="addItemsToColumns()" />
            </body>
    My Javascript
        $(function () {
            SP.SOD.executeOrDelayUntilScriptLoaded(Function.createDelegate(this, function () {
               var select = document.getElementById('dropdown').value;
                console.log(select);
                getSiteColumns(select);
            }), 'SP.js');
        var fieldChoice;
        var choices;
        var addFields = [];
        var slc;
        var clientContext;
        function optSelect() {
            slc = document.getElementById('dropdown').value;
            getSiteColumns(slc);
        function getSiteColumns(selection) {
           clientContext = SP.ClientContext.get_current();
            if (clientContext != undefined && clientContext != null) {
                var web = clientContext.get_web();
                fieldChoice = clientContext.castTo(web.get_availableFields().getByTitle(selection), SP.FieldChoice);
                clientContext.load(this.fieldChoice);
                clientContext.executeQueryAsync(Function.createDelegate(this, this.OnLoadSuccess), Function.createDelegate(this, this.OnLoadFailed));
        function OnLoadSuccess(sender, args) {
            choices = fieldChoice.get_choices();
            var textarea = document.getElementById("textareadisplay");
            textarea.value = choices.join("\n");
        function OnLoadFailed(sender, args) {
            alert('Request failed. ' + args.get_message() + '\n' + args.get_stackTrace());
        function addItemsToColumns() {
            clientC = SP.ClientContext.get_current();
            var arrayForUpdate = $('#textareadisplay').val().split('\n');
            fieldChoice.set_item(, arrayForUpdate);
            fieldChoice.update();
            clientContext.executeQueryAsync(function () { }, function () { });
        function OnUpdateSuccess(sender, args) {
            var newchoices = fieldChoice.get_choices();
    My problem is on the function addItemsToColumns() please help! Thanks in advance.

    Let's look at your stylesheet -
    <style type="text/css">
    body {
    background-image: url(assets/images/Business%20Men%20In%20Reception%20Col.2.jpg);
    background-repeat: no-repeat;
    background-color: #003;
    margin-left:auto;
    margin-right:auto;
    position: relative;
    width: 960px;
    It's a good idea not to use spaces or any punctuation in your filenames when working for the web.
    #header {
    margin-left:auto;
    margin-right:auto;
    position: relative;
    width: 960px;
    #heading {
    font-family: Georgia, "Times New Roman", Times, serif;
    font-size: 36px;
    font-style: italic;
    font-variant: normal;
    margin-left:auto;
    margin-right:auto;
    There's no need to specify the default values (font-variant:normal) or to specify auto margins for any block element without an explicitly defined width. And wouldn't it make more sense to put the font style on the body tag, where it will inherit into the rest of the page than to restate it as you have done in the next rule?
    #bodytext {
    font-family: Georgia, "Times New Roman", Times, serif;
    font-size: 18px;
    line-height: 25px;
    font-variant: normal;
    width: 300px;
    #container {
    width: 960px;
    position: relative;
    margin-left:auto;
    margin-right:auto;
    .rightimg {
    float: right;
    margin-left: auto;
    padding-right: 40px;
    #heading #navbar ul li {
    padding: 30px;
    </style>
    Margin-left:auto can't work without knowing what the width of the element is....  Keep your CSS lean and targeted - it will help you to debug your layouts.

  • How to display the content from a file  stored in database

    when i am trying to display the content from a file which stored in database on oracle report 10g
    data are displaying as following. please help me to display the data in readable format
    <HTML LANG="en-US" DIR="LTR">
    <!-- Generated: 1/11/2006, postxslt.pl [1012] v1
    Source: amsug304286.xml
    File: amsug304286.htm
    Context: nil
    Tiers: ALWAYS
    Pretrans: YES
    Label: Release 12 -->
    <HEAD>
    <!-- $Header: amsug304286.htm 120.4 2006/11/01 20:57:29 appldev noship $ -->
    <!--BOLOC ug1_OMPO1010302_TTL--><TITLE>Product Overview (ORACLE MARKETING)</TITLE><!--EOLOC ug1_OMPO1010302_TTL-->
    <LINK REL="stylesheet" HREF="../fnd/iHelp.css">
    </HEAD>
    <BODY BGCOLOR="#F8F8F8">
    <A NAME="T304286"></A><A NAME="ProdOve"></A>
    <CENTER><H2><!--BOLOC ug1_OMPO1010302--><B>Product Overview</B><!--EOLOC ug1_OMPO1010302--></H2></CENTER>
    <p><!--BOLOC ug1_OMPO1010304-->Oracle Marketing drives profit, not just responses, by intelligently marketing to the total customer/prospect base. By leveraging a single repository of customer information, you can better target and personalize your campaigns, and refine them in real time with powerful analytical tools.<!--EOLOC ug1_OMPO1010304--></p>
    <p><!--BOLOC ug1_OMPO1006611-->With tools necessary to automate the planning, budgeting, execution, and tracking of your marketing initiatives, Oracle Marketing provides you with:<!--EOLOC ug1_OMPO1006611--></p>
    <ul>
    <li>
    <p><!--BOLOC ug1_OMPO1006612--><B>Customer Insight</B> - With sophisticated customer management and list generation, Oracle Marketing enables you to quickly generate target lists and segments using an intuitive user interface. The easy to use Natural Query Language Builder (NLQB) lets you query for customers or prospects using a natural language while hiding data complexity; fatigue management ensures that you do not over-contact the same customers with marketing messages; and predictive analytics helps you predict customer behavior that you can leverage to produce significant increases in marketing return on investments (ROI).<!--EOLOC ug1_OMPO1006612--></p>
    </li>
    <li>
    ls.<!--EOLOC ug1_OMPO1010304--></p>
    <p><!--BOLOC ug1_OMPO1006611-->With tools necessary to automate the planning, budgeting, execution, and tracking of your marketing initiatives, Oracle Marketing provides you with:<!--EOLOC ug1_OMPO1006611--></p>
    <ul>
    <li>
    <p><!--BOLOC ug1_OMPO1006612--><B>Customer Insight</B> - With sophisticated customer management and list generation, Oracle Marketing enables you to quickly generate target lists and segments using an intuitive user interface. The easy to use Natural Query Language Builder (NLQB) lets you query for customers or prospects using a natural language while hiding data complexity; fatigue management ensures that you do not over-contact the same customers with marketing messages; and predictive analytics helps you predict customer behavior that you can leverage to produce significant increases in marketing return on investments (ROI).<!--EOLOC ug1_OMPO1006612--></p>
    </li>
    <li>
    <p><!--BOLOC ug1_OMPO1006613--><B>Sales Alignment</B> - Oracle Marketing's leads management helps you compile and distribute viable leads so that sales professionals can follow up valuable opportunities and not just contact interactions. Additionally, support for distributing proposals and marketing material drive speedy and consistent setups and collaboration of best practices.<!--EOLOC ug1_OMPO1006613--></p>
    </li>
    <li>
    <p><!--BOLOC ug1_OMPO1006614--><B>Marketing Insight</B> - While Oracle Marketing Home page reports and Daily Business Intelligence (DBI) for Marketing and Sales provide aggregated management level information in almost real time, operational metrics help in tracking the effectiveness of individual marketing activities.<!--EOLOC ug1_OMPO1006614--></p>
    </li></ul>
    </BODY>
    </HTML>
    <!-- Q6z5Ntkiuhw&JhsLdhtX.cg&Zp4q0b3A9f.&RQwJ4twK3pA (signum appsdocopis 1162406236 2673 Wed Nov 1 10:37:16 2006) -->

    Hi,
    you can try to use the:
    <b>ConsumerTreeListPreview</b>
    layout for KM navigation ivew (or customize to your own).
    This layout shows a folder tree on the left, a document list on the right. When you click on a document from the list it shows the contents of the file on the bottom of the iview.
    Hope this helps,
    Romano

  • How to display the contents of java.util.list in a frame???

    i should use awt only not applet...
    i need to display the contents of java.util.list in a frame...
    the contents contains rows queried from a oracle database.....
    the contents should be displayed similar to how a lable is displayed..
    please help me out..
    thanks
    dinesh

    Of course there is something in AWT:
    http://java.sun.com/j2se/1.5.0/docs/api/java/awt/List.
    htmlagain, if you carefully read the question, he needs a
    table to display a JDBC result set. There is no
    pre-made table component in AWT.Well, I read that he filled the data into a java.util.List and now wants to display this list. So a List-component should be sufficient. But I might be wrong...
    -Puce

  • How to display the content of a file in the portal?

    Hey guys, could anyone help?
    I just created a page which includes two iView, one is KM Navigation iView to display a certain repository, while the other is for displaying the content of a certain file I click in the navigation iView.
    And now the problem is when I click a file in the KM Navigation iView, it will pop up a new window to display it. How can I make it displayed in a fixed iView, which type of this iView should be?

    Hi,
    you can try to use the:
    <b>ConsumerTreeListPreview</b>
    layout for KM navigation ivew (or customize to your own).
    This layout shows a folder tree on the left, a document list on the right. When you click on a document from the list it shows the contents of the file on the bottom of the iview.
    Hope this helps,
    Romano

Maybe you are looking for