Displaying a Vector

I need to make a BullsEye using a Vector. I have a vector that contains Ellipse2D.Double. How can I display this vector and how can I get the colors to alternate between Red and White?

SoMeWhErEs wrote:
I need to make a BullsEye using a Vector. I have a vector that contains Ellipse2D.Double. How can I display this vector and how can I get the colors to alternate between Red and White?This sample program might help you: [_SwingPaintDemo.java_|http://java.sun.com/products/jfc/tsc/articles/painting/src/SwingPaintDemo.java]

Similar Messages

  • Displaying a vector in jsp

    I'm returning a vector, but I'm having trouble displaying it. The vector will contain a group of users, each containing FirstName, LastName and EmailAddress. I've the servlet working, but the I'm having trouble repeating the vector.
    <!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN">
    <html>
    <head>
        <title>User List</title>
    </head>
    <body>
    <h1>User Email List</h1>
    <%@ page import="business.*"%>
    <%
         Vector users = (Vector ) session.getAttribute("users");
         if (users==null){
              users = new Vector();
         users.setFirstName(request.getParamter("firstName"));
         users.setLastName(request.getParamter("LastName"));
         users.setEmailAddress(request.getParamter("emailAddress"));     
         session.setAttribute("users", users);
    %>
    <table cellpadding="5" border=1>
      <tr valign="bottom">
        <th>First Name</th>
        <th>Last Name</th>
        <th>Email Address</th>
      </tr>
    <% java.util.Vector users = (java.util.Vector)session.getAttribute("users");
       for (int i =0; i<users.size(); i++){
          business.Users users = (business.Users)users.get(i);
          %>
      <tr valign="top">
        <td><p><%= users.getFirstName() %></td>
        <td><p><%= users.getLastName() %></td>
        <td><p><%= users.getEmailAddress() %></td>
        <td><a href="../servlet/user11.ShowUserServlet?emailAddress=<%=users.getEmailAddress()%>">Update</a></td>
        <td><a href="../servlet/user11.DeleteUserServlet?emailAddress=<%=users.getEmailAddress()%>">Delete</a></td>
      </tr>
      <%}%>
    </table>
    </body>
    </html>

    Bad idea:     Vector users = (Vector ) session.getAttribute("users");
         if (users==null){
              users = new Vector();
         users.setFirstName(request.getParamter("firstName"));
         users.setLastName(request.getParamter("LastName"));
         users.setEmailAddress(request.getParamter("emailAddress"));
    users should probably be an instance of some class User ...

  • How can i display the values in the vector in a jsp using jstl

    in a task i am recieving a vector in a jsp... how can i display those vector values in the jsp using jstl.... plz help me
    thanks in advance

    <%
    here you got vector say; v
    pagecontext.setAttribute("varname",v);
    %>
    <c:forEach var="i" items="${varname}">
    <c:out value="${i}">
    </c:forEach>

  • Mapviewer 12c Generates Error When Displaying a Pre-Defined Vector Layer

    I have a predefined vector layer which I want to display using Mapviewer 12c. However, when I try to display the vector layer, I get an Java Null Pointer error. If I run the exact same code using a Mapviewer 11g (v11.1.1.7.3) environment, the map displays correctly with no errors.
    Is anyone experiencing similar problems with Mapviewer 12c?
    My environment consists of the following:
    1) Server OS: Linux x86_64 (RedHat Enterprise 5.11)
    2) Oracle Weblogic Server 12c
    3) I Manually Deployed an Exploded MapViewer EAR Folder in WebLogic Server
    http://[host]:[port]/mapviewer/omserver?getv=t
    Accessing this URL immediately resulted in the expected response text string:
    Ver12.1.3_B140430.1010
    4) I can successfully access the Weblogic Admin Console (http://[host]:[port]/console) and confirm the Weblogic is running, and that Mapviewer has been successfully deployed and running as well. I can also access the Mapviewer Admin Console (http://[host]:[port]/mapviewer)
    5) Mapviewer 12c has been configured to use the latest Java 7 JDK (i.e. Java 7 Update 75).
    The error I receive when attempting to display the predefined vector layer is:
    [2015-02-17T11:52:40.294-05:00] [AdminServer] [WARNING] [] [oracle.mapviewer.ws] [host: icdevapp004.info-control.com]
                [nwaddr: 192.168.157.210] [tid: 34] [userId: ] [ecid: 6f92f10c-b237-4f4d-b683-3d7ae3f903f3-0000001c,0] [APP: mapviewer] java.lang.NullPointerException[[
         at oracle.lbs.dataserver.MapDataServlet.doPost(MapDataServlet.java:235)
         at oracle.lbs.dataserver.MapDataServlet.doGet(MapDataServlet.java:155)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:844)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:280)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:254)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:136)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:346)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:25)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
         at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:202)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:137)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:460)
         at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:120)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:217)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:81)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
         at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:220)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3436)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3402)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
         at weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:57)
         at weblogic.servlet.internal.WebAppServletContext.doSecuredExecute(WebAppServletContext.java:2285)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2201)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2179)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1572)
         at weblogic.servlet.provider.ContainerSupportProviderImpl$WlsRequestExecutor.run(ContainerSupportProviderImpl.java:255)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:311)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:263)
    Here is a sample of the code I am using to display the map.
    test12c_2.html
    yard1_12c.js
    var baseURL = "http://192.168.157.210:7003/mapviewer";
    var vDataSource = 'logitdv1';
    var map = {};
    var vlayer = {};
    function showMap(){
        OM.gv.setResourcePath(baseURL+"/jslib/v2");           
        map = new OM.Map(
            document.getElementById('map'),
                mapviewerURL: baseURL,
                universe: new OM.universe.ElocationUniverse()
    // OpenStreet Maps
        var tileLayer = new OM.layer.OSMTileLayer("OSMLayer1");
        map.addLayer(tileLayer);
        vlayer = new OM.layer.VectorLayer("UserGeo",
                infoWindow: false,
                def:{
                    type: OM.layer.VectorLayer.TYPE_PREDEFINED,
                    dataSource: vDataSource,
                    theme: 'damco_perimeter',
                    loadOnDemand: false,
                    url: baseURL
        map.addLayer(vlayer);
        vlayer.zoomToTheme();
        map.init();
    Message was edited by: Wayne Blumstengel
    - Added attachment test12c_2.html

    I installed the Latest OracleMaps HTML5 (V2) API Update - March 2015 (http://download.oracle.com/otn/other/mapviewer/11g_ps6_3/oraclemapsv2_11_1_1_7_3_1.zip) and the issue seems to have been resolved with this update.
    I deployed the 11.1.1.7.3.1 update against my v12.1.3 mapviewer installation (as per the instructions in the readme file), and the prefined vector layer now displays correctly using Mapviewer 12c.

  • Indesign CC BUG REPORT: Vector option not working in slideshow overlay panel

    Trying to set an object state to display in vector mode in Indesign CC. But when I select it in the pull down of the overlay slideshow panel, it doesn't stick (and sometimes crashes Indesign CC). Anyone else having this problem?

    that didn't work. I'm still having the problem. However I am able to overcome it by selecting a state then switching to whole object state selection, and then setting it to vector that way. but it's still sketchy at best.
    I have now found out that if I select it a second time straight away, it works. but on first time it still doesn't set it

  • Vectors -please explain

    I'm looking through a textbook (Java How to program by Dietel abd Dietel) which provides some code to connect to database and then to display the database on the screen. However, I am trying to understand the code and can't understand the following methods.
    From what i can see currentRow is a vector within a set of other vectors; rows. Am I right? Basically I just want to know how the vectors in this code extract work. Thanks.
    private void displayResultSet(ResultSet rs)throws SQLException{
           boolean moreRecords = rs.next(); //position to first records
    //       If there are no records, display a message
              if (! moreRecords){
                   JOptionPane.showMessageDialog (this, "The specified table contains no"
                                                         + " records");
                   setTitle ("No records to display");
                   return;
              Vector columnHeads = new Vector ();
              Vector rows = new Vector();
              try{
    //       get column heads
                   ResultSetMetaData rsmd = rs.getMetaData();
                   theCount = rsmd.getColumnCount();
                   dist.setUp(theCount, theRowCount);
                   for (int i = 1; i <= rsmd.getColumnCount(); ++i)
                        columnHeads.addElement(rsmd.getColumnName(i));
                        do{
                             rCount++;
                             rows.addElement(getNextRow(rs, rsmd));
                        } while (rs.next());
                   JTable thetable = new JTable (rows, columnHeads);
                   JScrollPane scroller = new JScrollPane(thetable);
                    getContentPane().add(scroller, BorderLayout.CENTER);
                   validate();
                     dist.doComparison(columnHeads, rows);
         catch (SQLException e){
           //display some message
      private Vector getNextRow(ResultSet rs, ResultSetMetaData rsmd)
           throws SQLException{
       Vector currentRow = new Vector();
         for (int i=1; i <= rsmd.getColumnCount(); ++i)
              switch (rsmd.getColumnType(i)){
                   case Types.VARCHAR:currentRow.addElement(rs.getString(i));
                        break;
                   case Types.INTEGER:currentRow.addElement(new Long (rs.getLong (i)));
                        break;
                   default:
                        System.out.println("Type was: " + rsmd.getColumnTypeName (i));
         return currentRow;
      }

    Did D&D tell you to put this code in?
         catch (SQLException e){
         //display some message
         }Terrible idea. At LEAST print the stack trace:
    catch (Exception e)
        e.printStackTrace();
    }An empty catch block is a great way to have a class that fails "mysteriously" with no feedback or info. You'll debug for a long time until you add that stack trace print.
    I've heard that D&D puts out good books, but if they're recommending that you code this way I'd throw it out.
    If you did that on your own, give yourself a d0pe slap and add the stack trace from now on. - MOD

  • How to remove antialiasing of vector images?

    Hello. Currently, I am editing bitmap images that are not antialiased, and I made lots of vector shape layers.
    And what I want to do is remove antialiasing of all vector layers  because if they are antialiased, they can not  fit into forementioned non-antialiased bitmap  images.
    I found an option to display aliasing vector images, I mean "Layer image quality" option in time line panel, and I set it  "draft", but if I render my sequence, AE won't allow  me to render the draft, aliasing vector image. They are antialiased. AE ignores the draft setting and renders vector layers as best quality, antialiased image.
    So I want to ask how to remove  antialiasing of vector image completely.
    Please help me. Thank you.

    I found the option.Thank you.
    And I want to ask one more question.
    I guess If I set render settings as Draft quality, AE renders all layers including "Best Quality" layers as Draft quality.If so,there is a problem.
    If I want to render "A" bitmap layer(this layer has effects like Fast blur, Hue/Saturation) as Best quality and "B" vector layer(No effect) as Draft quality, and  If I render A and B layers as Draft quality, it means I can't render "A" layer as Best quality? If so, it will be a problem. I read a manual and it says some effects won't work correctly on Draft quality layers. Is it alright to render them all  as Draft quality?

  • Raster map is not displaying on map

    Hi Dear,
    i have a problem displaying raster map. raster maps are successfully loaded and i created raster theme and able to display raster maps on map builder. then i created a map which contains 2 geometry themes and 1 raster theme i am able to see all these themes together in mapbuilder displaying fine. but when i am trying to display on map its displaying only geometry themes
    not displaying rasters on map
    here is my raster theme xml code
    <?xml version="1.0" standalone="yes"?>
    <styling_rules theme_type="georaster">
    </styling_rules>
    do i need to add any more additions to my raster theme to display on my map ?
    please some one let me know
    Thanks
    Kabeer

    Hi Joao
    i copied those jar files to my mapviewer WEB-INF\lib directory and its working fine. its displaying my vector and raster data on my map.
    but there was small thing i what i recognized that before copying these files i had a georaster theme map and it does not display even if i run Purge cached metadata from mapviewer.
    i created again another georaster theme map and created cache then it worked with me.
    Thanks once again
    Regards
    Kabeer

  • Storing Vector Application Scope - Pressed for time

    I'm reading in a file through my application and right now every time a user goes to the page, the file is being read in and parsed etc etc to be formatted for display. Now, I know this can hamper performance dramatically as the users increase, and I want to be able to make this task work optimally.
    The file is also being updated through FTP every 15 minutes, and I want to be able to have the correct version read in when a user accesses the page. My first question is whether this is a good way of going about getting and presenting the information?
    Secondly, I want to somehow store the Vector of lines from the file globally so that all the users can use it. I want to store the Vector, and a timestamp consisting of the file's last modification date in order to do a check of whether to access the current Vector, or read in the file again and refresh the timestamp all across the application (so the one user to be reading the file during the time that a new file comes in will update it for all other users). What's the best way to go about doing this?
    *** Also - If you are familiar with tags, I'd like to know how I can add this functionality to my current tags (one which reads the file, and the other which displays the Vector of lines). I'm not sure how to have the tag just read in session attributes, or just variables that reside on the page.
    I really really appreciate your time and help in this matter,
    Thank you,
    Lior

    Caches for all the users. Unfortunately since the code is proprietary, I cannot send you the actual code. But here are the steps to do it:
    in web.xml do this:
    1.
    <servlet>
    <servlet-name>ReadfileServlet</servlet-name>
    <servlet-class>somepackage.BootstrapServlet</servlet-class>
    <init-param>
    <param-name>FilePath</param-name>
    <param-value>c:\filetoread</param-value>
    </init-param>
    <load-on-startup>1</load-on-startup>
    </servlet>
    2.
    Create a Global class (say GlobalVariables) which has a member variable (say m_FileContent) and static synchronized set/get methods for the member variable.
    3.
    In ReadFileServlet's init method,
    Read the file specified in FilePath. Then assign it to a servlet member variable (why do you neeed a vector? why not a String?)
    Then assign this member variable to the Global class's member variable using the set method (GlobalVariables.setVariable(variable)).
    4.
    From any jsp use variable = GlobalVariables.getVariable().
    Hope this helps.
    -Srini

  • Issues with vector resizing & rotation! (CS5)

    I need some help and cannot seem to find the solution anywhere!
    All of my questions come from this basic task: Dragging files from Illustrator into Photoshop
    PROBLEM #1
    In CS3, when I dragged vector Illustrator files over into Photoshop, it used to automatically resize the vector image to fit the canvas I was working on. It doesn't do that anymore with CS5. Now when I drag files over from Illustrator, it places it at full size, so I waste a lot of time having to zoom out, make it smaller, and zoom back into my project. I DO have "Resize Image During Place" selected in Photoshop, but it still doesn't resize it! I went back to CS3 and it automatically fit the vector image I was trying to drag over into my project so it fit!
    PROBLEM #2
    In CS3, when I rotated a vector image (usually that I dragged over from Illustrator), it would maintain the bounding box, but now in CS5 it doesn't! For instance, I would normally drag an Illustrator file into Photoshop, then want to rotate the image as desired. Then later in the day if I wanted to rotate the image a little more or less, all I had to do was select the vector image and it would keep that rotated box around it, and would tell me that the image was currently rotated 41 degrees. However, in CS5, when I rotate a vector image and then want to re-rotate it, or re-size it, later in the day it doesn't do it. When I select the vector image, the bounding box is always a box or rectangle, with all flat sides, and it tells me that the image is rotated 0 degrees (even though earlier I may have rotated it, say, 70 degrees). I'm not explaining this very well, but basically, I can't resize or rotate it more than once because it acts like it rasterizes the image, if that makes any sense.
    Bottom line, these are HUGE annoyances for what I do!
    PLEASE HELP!
    wyzz7

    Ok, here are the three screenshots. Sorry if they're hard to see. Adobe puts a cap on size...
    In the first screenshot, you can see I dragged a vector image of a sweatshirt from Illustrator into Photoshop, and it didn't resize it. In this instance, my Photoshop size was 1500x1500. Most of the time, I'm working on small images (under 300px). So when I drag an image over, it's massive compared to my canvas size. It's a huge annoyance and time waster.
    In the second screenshot, I rotated the images as I wanted. However I want it to maintain that rotated bounding box (and it would keep it in CS3), but it doesn't now.
    In the final screenshot, you can see how it displays the vector image after I rotated it, then wanted to re-rotate it or resize it. It defaults back to a square bounding box. Therefore, if I wanted to compress the image vertically (make the sweatshirt shorter), it will skew/distort the image.
    Did that make things more clear?

  • Vector a content of a JTable cell

    I seee that you can put object into a cell in a JTable such as Integer and Boolean. Is it possible to put a vector in the cell and then use a custom cell renderer to display that vector graphically. I would very much appreciate a quick example!!!
    Thanks - happy new year lets hope its a better one

    I have looked there but didnt really understand it to well. I have a cellrenderer that draws the appropriate stuff but not based upon the value in the cell. Is it to do with the getColumnClass methods? If so what do I need to put in my table model and how does the renderer know?
    Thanks

  • JSP Vector problem

    Hi, I've a jsp displaying a vector, however, every time I display the contents of the vector, it always has a null vector at the end. Which appears as null in every field. Why is this the case? The servlet which connects with the database is included also:
    ------------------------------UserServlet------------
    package user;
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.sql.*;
    import business.*;
    import data.*;
    import util.*;
    import java.util.Vector;
    public class UserServlet extends HttpServlet{
        private MarshPool connectionPool;
        public void init() throws ServletException{
            connectionPool = MarshPool.getInstance();
        public void destroy() {
            connectionPool.destroy();
        public void doGet(HttpServletRequest request,
                          HttpServletResponse response)
                          throws IOException, ServletException{
            HttpSession session = request.getSession(true);
          Vector users = new Vector();
            try{
              Connection connection = connectionPool.getConnection();
                users = UserDB.readRecords(connection);
            catch(SQLException e){
                System.out.println("Users SQLException: " + e);
            if ( (users == null) ||
                 (users.size()<=0) ){
                response.sendRedirect("/test/");
            else{
                session.setAttribute("users", users);
                RequestDispatcher dispatcher =
                    getServletContext().getRequestDispatcher(
                        "/user/users.jsp");
                dispatcher.forward(request, response);
        public void doPost(HttpServletRequest request,
                           HttpServletResponse response)
                           throws IOException, ServletException{
             doGet(request, response);
    }--------------------------------------users.jsp----------------------------------------
    <%@ page import="java.util.Vector,  business.User" %>
    <!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN">
    <html>
    <head>
        <title>User List</title>
    </head>
    <body>
    <h1>User Email List</h1>
    <%@ page import="business.*"%>
    <%
         Vector users = (Vector ) session.getAttribute("users");
         if (users==null){
              users = new Vector();
         business.User buser=new business.User ();
         buser.setFirstName(request.getParameter("firstName"));
         buser.setLastName(request.getParameter("LastName"));
         buser.setEmailAddress(request.getParameter("emailAddress"));    
         users.add(buser);
         session.setAttribute("users", users);
    %>
    <table cellpadding="5" border=1>
      <tr valign="bottom">
        <th>First Name</th>
        <th>Last Name</th>
        <th>Email Address</th>
      </tr>
    <% java.util.Vector vectorusers = (java.util.Vector)session.getAttribute("users");
       for (int i =0; i<vectorusers.size(); i++){
          business.User busers = (business.User)vectorusers.get(i);
          %>
      <tr valign="top">
        <td><p><%= busers.getFirstName() %></td>
        <td><p><%= busers.getLastName() %></td>
        <td><p><%= busers.getEmailAddress() %></td>
        <td><a href="../servlet/user.ShowUserServlet?emailAddress=<%=busers.getEmailAddress()%>">Update</a></td>
        <td><a href="../servlet/user.DeleteUserServlet?emailAddress=<%=busers.getEmailAddress()%>">Delete</a></td>
      </tr>
      <%}%>
    </table>
    </body>
    </html>

    This is my jsp which diplays a list of users. thanks again
    <%@ page import="java.util.Vector,  business.User" %>
    <!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN">
    <html>
    <head>
        <title>User List</title>
    </head>
    <body>
    <h1>User Email List</h1>
    <%@ page import="business.*"%>
    <%
         Vector users = (Vector ) session.getAttribute("users");
         if (users==null){
              users = new Vector();
         business.User buser=new business.User ();
         buser.setFirstName(request.getParameter("firstName"));
         buser.setLastName(request.getParameter("LastName"));
         buser.setEmailAddress(request.getParameter("emailAddress"));    
         users.add(buser);
         session.setAttribute("users", users);
    %>
    <table cellpadding="5" border=1>
      <tr valign="bottom">
        <th>First Name</th>
        <th>Last Name</th>
        <th>Email Address</th>
      </tr>
    <% java.util.Vector vectorusers = (java.util.Vector)session.getAttribute("users");
       for (int i =0; i<vectorusers.size(); i++){
          business.User busers = (business.User)vectorusers.get(i);
          %>
      <tr valign="top">
        <td><p><%= busers.getFirstName() %></td>
        <td><p><%= busers.getLastName() %></td>
        <td><p><%= busers.getEmailAddress() %></td>
        <td><a href="../servlet/user.ShowUserServlet?emailAddress=<%=busers.getEmailAddress()%>">Update</a></td>
        <td><a href="../servlet/user.DeleteUserServlet?emailAddress=<%=busers.getEmailAddress()%>">Delete</a></td>
      </tr>
      <%}%>
    </table>
    </body>
    </html>

  • From database to drop down box

    Hi all,
    Suppose I have the following
    String query ="Select name, number from Person";
    I want to put all the "names" in a drop down box and all the "numbers" in a separate drop down box. When I do this:
    while(rs.next()){
    <select="person" onchange="showSelection">
    <option value="<%=rs.getString("name")%>"><%=rs.getString("name")%></option></select>
    I only get the value of the first name in my table. Can anyone help me?

    Hi
    I think you need to do some order. my suggestion is to create an Object that contains name and number like this:public class MyClass {
         String name;
         int number;
         public MyClass(String n,int num){
              setName(n);
              setNumber(num);
         //set and get methods for the data members...
    }next, roll over the ResultSet and create MyClass object each time and add it to a Vector or something like that. usually a drop down box displays many times and it will be very bad if you will query the data base each time you want to display it, thats why i suggest you to save this Vector in a bean or somewhere else (of course, if the data is static).
    than display the vector content like this:<select name="person" onchange="showSelection">
    <%     Enumeration e=vec.elements();
         while(e.hasMoreElements()){
              MyClass m=(MyClass)e.nextElement();
    %>          <option value="<%=m.getName();%>"><%=m.getName();%></option>
    <%     }%>
    </select>
    <%     e=vec.elements();
    %><select name="number" onchange="showSelection">
    <%     while(vec.hasNext()){
              MyClass m=(MyClass)vec.next();
    %>          <option value="<%=m.getNumber();%>"><%=m.getNumber();%></option>
    <%     }%>
    </select>pay attention on how you wrote the select tag: <select="person"...
    and not: <select name="person"...
    hope it helps
    mamtz
    BTW
    think of using struts and custom tags in jsp it will much easier to do this!!!

  • How do I convert an Encore project to an iTunes or Android app?

    I've got a rather complex video project with lots of submenus (that works as a DVD - so it is "debugged") that I need to be able to export from Encore into an app to upload on the iTunes store and Android Market. So far, I've managed to export the project via Encore's Flash output and test the results using a web browser (it works).
    Everything got saved in a new folder structure with an index.html file pointing to a flashdvd.swf file pointing to a AuthoredContent.xml file that actually holds all the information on the file structure (there are 99 files totalling over 200 megabytes at the lowest resolution in the Sources subfolder) and uses a Theme.xml file to generate a background.
    So I need to somehow convert this "stuff" into something that can be uploaded to the appropriate store. I stumbled upon Jeanette Stalions tutorials on using Flash Builder for this purpose, but can't even figure out how to open the Encore  output in some meaningful way using Flash Builder so I can get started. (yes the swf file can be opened but that doesn't seem to have any particular value since all it does is point to the xml files.)
       1. I've got Flash Builder 4.5 - do I need to upgrade to 4.7 in order to import the project or can this be done in 4.5?
    2. Is there some intermediate step that I'm missing? Do I need to do something in Flash Pro first?
    3. Will Flash Builder be able to repackage all these files into the file specs required by each target platform (I'm assuming it will - is that a valid assumption)?
    And moving downstream a bit...
    4. Since this is a video based project with over 200 megabytes of F4V content, how will the content arrive on the end user device? Will it have to be  streamed or can it be downloaded? - this is a big issue should the app become popular and we be forced to maintain a streaming server somewhere. What about server sizing in such an event? For example: is there a way to estimate how much bandwidth is required per 1,000 instances?
    <moved by mod from flash pro cc forum - kglad>

    Ok, so I opened Flash Builder, created a new project and after a lot of trial & error was able to bring in all the files from the Encore output using import/general/file_system in one chunk. That at least gets me to something that might have a future!
    As to question 1 above: Many of the articles I've found in the Developer Center refer to various versions of tools: Flex, Flex Builder (now called Flash Builder), Flex SDK, Spark, ActionScript and Flash Catalyst. The products seem to have undergone quite a few transformations and specific processes like roundtripping between Catalyst & Flash Builder are now obsolete since Catalyst is now a dead product.  So does this mean that all (or many) of these confusing tools are now united in Flash Builder 4.7?
    And this begs the question "how does a newcomer get started building an AIR app without having to learn the entire history of Flash and it's evolution from simple display of vector graphics to a Swiss Army knife environment?"

  • Hiding a column in a JTable

    How can I code something so that when I click on a button, it will go and hide or show various columns from the table?
    I want to do this, so the JTable won't take up the whole screen.
    Vermelh0

    make 2 vectors.
    1 vector x with all the values
    1 vector y with only the values you want to display
    put vector y into the table.
    when you want to change whats in the table, redo vector y clear the table and put vector y back in.
    I would code that, but I'm lazy and I hate doing tables....

Maybe you are looking for

  • Problem with Export to Excel from ALV view.

    Hello @all, i have a problem on my webdynpro application. I use the component SALV_WD_TABLE. I become display my data but when i want to export the table to ecel, i became a short dump with the message in the browser: Access via 'NULL' object referen

  • ITunes 10.6.1.7 cannot access

    I open iTunes program (10.6.1.7). After waiting a while, I found error as in blue text below and cannot open iTunes program. I already try 1. Repair program by iTune software 2. Remove iTunes and intall it again However, the problem still happen. Ple

  • Problem with chart width

    Hi all, I have a problem with a chart. I show a columnChart at 100% width. The dataprovider is hierarchic. So every object in it has a 'children' property which is a new ArrayCollections. This way, I'm able to descend in the hierarchy by scripting th

  • Problems with authenticated smtp on Mac mail 2

    I do support for a small ISP and we are seeing problems with Mac Mail authenticating to the smtp server. The settings that should work are: outgoing server: asmtp.gorge.net Username: full email address Outgoing server port: 2525 or 587 We typically t

  • [SOLVED]vim file specific settings (ie. modelines)

    I'm referring to a line in a file s/a # vim: ft=sh ts=4 et sw=4: I have that line at the bottom of a .bashrc file. When I open it with vim as a regular user, the settings are applied. When I open it with vim as root (logged in as root; no sudo involv