Htmlb:Retrive values from bean n display it in textView

Hi,
I am doing one PDK application using jspdyn page. In jsp page I am using htmlb to display the table. In that I am using one text view element. There I need to get the values from bean class.And display it in a table.
Can anyone help me how can use the textView inside htmlb to retrieve the values from bean.
Thanks & Regards
Vineela

hi vineela,
check this
https://www.avispublics.com/irj/portalapps/com.sap.portal.pdk.htmlb.htmlbmanuals/docs/dynpage-01.html
https://ww2.avispublicsduparisien.com/irj/portalapps/com.sap.portal.pdk.htmlb.htmlbmanuals/docs/tableview-01.html
bvr
Edited by: bvr on Mar 4, 2009 12:06 PM

Similar Messages

  • Htmlb:get the values from bean n display it in textView

    Hi,
    I am doing one PDK application using jspdyn page. In jsp page I am using htmlb to display the table. In that I am using one text view element. There I need to get the values from bean class.And display it in a table.
    Can anyone help me how can use the textView inside htmlb to retrieve the values from bean.
    Thanks & Regards
    Vineela

    hi vineela,
    For the textView, in the text value write the code  <%=myBean.getStr()%>
    where myBean will be your bean class and getStr() is the method in the bean class whcih returns value which needs to be displayed on the screen.
    Thanks
    Harsimran

  • Problem in Retrive values from result set

    I have a class where i do all database operation .First i fire select query and take values from result set and based on that value i fire update query.
    Problem is that i am not getting all values from result set . i get only last value and when i fire update query i get error as :Resultset is closed.
    I am using acess and java.

    You probably are using the same Statement object for both queries? Try creating separate Statement objects for each query. (My guess is this a problem with the way you're using JDBC, not a Servlet issue.)

  • How to retrive value from SVG and put in XLS(excel) file ?

    Hello all,
    I ll appreciate you if you help me in this issue,
    My Project Manager give me a task of creating a java program to take values from SVG file and put that data into a particular cell.
    Can you give me some favourable hints to help in this issue.
    Thanks in advance.
    Jaison

    If by "array format" you mean comma-separated, why not
    FOR x IN v_searchResult.FIRST .. v_searchResult.LAST
    LOOP
    v_id := v_id || TO_CHAR(v_searchResult(i).Product_ID);
    END LOOP;or even better....
    FOR x IN v_searchResult.FIRST .. v_searchResult.LAST
    LOOP
        IF x =  v_searchResult.FIRST
        THEN
           v_id TO_CHAR(v_searchResult(x).Product_ID);
        ELSE
           v_id := v_id ||','|| TO_CHAR(v_searchResult(x).Product_ID);
        END IF;
    END LOOP;Cheers, APC

  • Shopping cart!! Retriving values from Hashtable?

    Hi,
    Could you please help me solve this problem?
    I am adding some values to the Hashtable. For every time I add the server is definitely showing
    me that some thing is added to the Hashtable. But when I try to print the values present in
    Hashtable, I do not see any thing on the browser other than "table headers" ? Can any one help
    me?
    Here are the codes
    ShopBean.java
    import java.util.*;
    import java.lang.*;
    public class ShopBean
         private Hashtable hashtable = new Hashtable();
         public ShopBean()
         public void addToCart(String itemid,String name,float price,int quantity)
              String[] items = {itemid,name,Float.toString(price),Integer.toString(quantity)};
              if(hashtable.containsKey(itemid))
                   String[] tmpItem = (String[])hashtable.get(itemid);     
                   int tmpQuantity = Integer.parseInt(tmpItem[3]);
                   quantity += tmpQuantity;
                   tmpItem[3] = Integer.toString(quantity);
              else
                   hashtable.put(itemid,items);
         public Enumeration getEnumeration()
              return hashtable.elements();
    Tibre.java
    public class Tibre extends HttpServlet
         String user,s1,s2,s3,s4,s5,s6,s7,prev,next,flag;
         int i,count=0,i1,i2,i3,i4,records=0,from,to,no,rem,k,c;
         public void doGet(HttpServletRequest req,HttpServletResponse res)
              doPost(req,res);
         public void doPost(HttpServletRequest req,HttpServletResponse res)
              try
                   ServletOutputStream sos = res.getOutputStream();
                   HttpSession ses = req.getSession(true);
                   user=(String)ses.getValue("user");
                   ShopBean cart = new ShopBean();
                   String id = req.getParameter("id");
                   if(id != null)
                        String name = req.getParameter("name");
                        Float price = new Float(req.getParameter("price"));
                        cart.addToCart(id,name,price.floatValue(),1);
                        System.out.println("cart values in tibre.java"+cart);
                   sos.println("<html>");
                   sos.println("<body bgcolor=lightyellow>");
                   sos.println("<p>Welcome to Online shopping "+user+" , Please see the
    gallery of items.</p>");
                   sos.println("<table border='1' cellspacing='1' width='41%'
    cellpadding='2' id='AutoNumber1'>");
                   sos.println("<tr>");
                        sos.println("<td width='21%'>");
                        sos.println("<img border='0' src='images/11.gif' width='120'
    height='150'>   ");
                        sos.println("</td>");
                        sos.println("<td width='79%'>");
                        sos.println("<img border='0' src='images/22.gif' width='120'
    height='150'></td>");
                   sos.println("</tr>");
                   sos.println("<tr>");
                   sos.println("<form method='post'
    action='http://localhost:8080/servlet/Tibre'>");
                        sos.println("<td width='21%'>$300 <input type=submit value='Add
    to Cart' name=tibre1>");
                        sos.println("</td>");
                        sos.println("<input type='hidden' value='100' name='id'>");
                        sos.println("<input type='hidden' value='Tibre' name='name'>");
                        sos.println("<input type='hidden' value='300.89' name='price'>");
                        res.sendRedirect("http://localhost:8080/servlet/Tibre");
                        sos.println("</form>");
                        sos.println("<form method='post'
    action='http://localhost:8080/servlet/Tibre'>");
                        sos.println("<td width='79%'>$800.99 <input type=submit
    value='Add to Cart' name=tibre2>");
                        sos.println("</td>");
                        sos.println("<input type='hidden' value='200' name='id'>");
                        sos.println("<input type='hidden' value='Compaq' name='name'>");
                        sos.println("<input type='hidden' value='800.99' name='price'>");
                        res.sendRedirect("http://localhost:8080/servlet/Tibre");
                        sos.println("</form>");
                   sos.println("</tr>");
                   sos.println("</table>");
                   sos.println("<a href='http://localhost:8080/servlet/ViewCart'>View
    Cart</a>");
                   sos.println("</body>");
                   sos.println("</html>");
              catch(Exception e)
                   e.printStackTrace();
    ViewCart.java // When I click viewcart I should display the contents from the hashtable
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.util.*;
    public class ViewCart extends HttpServlet
         public void doGet(HttpServletRequest req,HttpServletResponse res)
              try
                   ServletOutputStream sos = res.getOutputStream();
                   ShopBean cart = new ShopBean();
                   sos.println("<html><head>");
                   sos.println("<title> Shopping Cart Contents</title>");
                   sos.println("</head>");
                   sos.println("<body bgcolor=lightyellow>");
                   sos.println("<table border='1' width='300' cellspacing='0'
    cellpadding='2' align='center'>");
                   sos.println("<caption><b>Shopping cart contents</b></caption>");
    sos.println("<tr><th>description</th><th>Price</th><th>Quantity</th></tr>");
                   Enumeration enum=cart.getEnumeration();
                   String[] tmpItem;
                   while(enum.hasMoreElements())
                        tmpItem=(String[])enum.nextElement();
                        sos.println("<tr>");
                        sos.println("<td>"+tmpItem[1]+"</td>");
                        sos.println("<td align='center'>"+tmpItem[2]+"</td>");
                        sos.println("<td align='center'>"+tmpItem[3]+"</td></tr>");
                   sos.println("</table>");
                   sos.println("</center>");
                   sos.println("<a     href='http://localhost:8080/servlet/Tibre'>Back to
    Catalog</a>");
                   sos.println("</body>");
                   sos.println("</html>");
              catch(Exception e)
                   e.printStackTrace();
    Also please correct me if there are any mistakes in my code.
    Thanks for any help
    Uma

    Few errors,
    1.Your 'addToCart' method in the bean will not work as you are thinking. Try to find out the reason by yourself.
    2.ShopBean cart = new ShopBean(); in your ViewCart servlet gives you a fresh bean with a blank hashtable. Obviously it will not contain any items and hence you are not getting them displayed in the browser. Again you need to find out the error, I can give you a clue, Insert an item in the bean's constructor and test your code.
    3.You need to carry the information between your servlets, session is the best thing to use. So, your bean's scope must be session.
    Try to solve it by yourself, this forum will always be there to guide you.
    Hope this helps.
    Sudha

  • Selecting a MAX value from a table & displaying it on a form using OCI PHP

    WinXP Pro SP3- 32bit
    Apache/2.2.22 (Win32) mod_fcgid/2.3.6 PHP/5.4.0
    PHP Version 5.4.0
    Oracle epxress 11g
    problem: output on form displaying Resource id #4 instead of the number from the table.
    (maybe it's number to string conversion issue?)
    $conn = oci_connect('system', 'mypassword', 'localhost/xe');
    $query = "SELECT MAX(CustNo)+1 AS MAXNUM FROM customer";
    $stmt = OCIParse($conn, $query);
    OCIExecute($stmt);
    OCIFetch($stmt);
    echo OCIResult($stmt, "MAXNUM")." will be next number.";
    //OCIFreeStatement($stmt); //frees the resources- use a the end!
    $daNextNo = $stmt;
    echo $daNextNo;
    //$daNextNo = OCIBindByName($stmt, ":text", &$form_text, -1); //not sure how this works if it'll fix the issue
    ?>
    <form name="Addcust" action="process_cust.php" method="post">
    <input type="text" name="CustNo" value="<?php echo $daNextNo;?>" /></br>
    output of complete code:
    45 will be next number.Resource id #4
    And inside the textbox it says: 45 will be next number.Resource id #4
    how can I put the 45 into $php variable so i can use it in a textbox or on a label?
    Thank you in advance .

    THanks. i couldn;t find the PHP section.
    I figured it out
    i used nextval() to convert the object to a string.
    <?php
    $conn = oci_connect('system', '1234', 'localhost/xe');
    if (!$conn) {
    $m = oci_error();
    trigger_error('Could not connect to database: '. $m['message'], E_USER_ERROR);
    $query = "SELECT MAX(CustNo)+1 AS MAXNUM FROM customer";
    //$daNextNo = $query;
    $stmt = OCIParse($conn, $query);
    OCIExecute($stmt);
    OCIFetch($stmt);
    echo OCIResult($stmt, "MAXNUM")." will be next number.";
    //OCIFreeStatement($stmt); //frees the resources- use a the end!
    $daNextNo = strval(OCIResult($stmt, "MAXNUM")." .");
    $daNextNo = strval(OCIResult($stmt, "MAXNUM"));
    echo "danextNo: ";
    echo $daNextNo;
    ?>
    <form name="Addcust" action="process_cust.php" method="post">
                                       <div>
                                       <dl>
                                            <dt>* <?php //echo $this->lang->line('cust_fn'); ?>: </dt>
                                            <dd><input type="text" name="CustNo" value="<?php echo $daNextNo;?>" /></dd>

  • Read integer values from spreadsheet and display the values in a table

    Hi all,
    I have integer values to read from a spreadsheet and display them in a table. I am using 'Read from spreadsheet file' in 'integer' mode. I would like to display these values in a table. The problem is that the table takes only 2d-array of string as input but not integer.  
    It works fine if I change the mode of 'Read from spreadsheet file' from 'integer' to 'string' but I want to read integers and have to use the integer values for further calculations. Please give any suggestions on displaying integers to a table.
    Thank you. 
    Solved!
    Go to Solution.

    No don't take element by element just convert as a whole. See the attached example
    Good luck
    The best solution is the one you find it by yourself

  • Retriev values from database and display in a ComboBox

    hi all,
    i think the subject explains it all. how? currently iam using vectors which is giving me lots of problems and errors, whenever it adds to the combobox it adds the square braces as well example if the value in database is asrar then it will display [asrar], what is causing that? does anybody now any easier way??
    asrar

    please can someone help me
    asrar

  • Retriving value from Pie chart to hidden field using onmouseover event

    Hi,
    I am Vaibhav. I have create Pie chart on EMP table. Pie chart query is as follows,
    SELECT 'javascript:onmouseover=$x(''P25_DEPTNO'').value='||deptno||';popupURL(''http://www.google.com'');' LINK,
    deptno, COUNT (empno)
    FROM emp
    GROUP BY deptno
    On mouseover on Pie chart i want to get value of deptno column but from above query i am not getting the value of deptno. So how should I get value of deptno on mouseover event on Pie chart.
    Thanks in advance,
    Regards,
    Vaibhav
    Edited by: user10600404 on Feb 28, 2011 10:39 PM

    Hi,
    I can get it to work with:
    SELECT 'javascript:onclick=$x("P24_DEPTNO").value='||deptno||';popupURL("http://www.google.com");' LINK,
    deptno, COUNT (empno)
    FROM emp
    GROUP BY deptno That is - using onclick instead of onmouseover.
    See: http://apex.oracle.com/pls/otn/f?p=9568:24 - the Select list is updated as you click on a slice in the pie chart
    Andy

  • How to retrive value from column of type number

    Hi,
    I have a site column 'Sample' which is of type Number. Number of decimal places for the column is specified as 0.
    Consider the Sample column has a value '2'.
    When I retrieve the properties for Sample column, the value is displayed as 2.0000000
    I am retrieving the listitem properties using SPListItem.Properties in ItemCheckedin event.
    How to get value without the decimal places?
    Thanks in advance,
    dhijit

    Hi.
    You can cast this value as int.
    int myVal = (int)myItem["myField"];
    if cast crashes, try to use int.TryParse or Convert.ToInt32 Mehods
    Regards,
    Bubu
    http://zsvipullo.blogspot.it
    Please mark my answer if it helped you, I would greatly appreciate it.

  • How to get Date value from database and display them in a drop down list?

    Hello.
    In my Customers table, I have a column with Date data type. I want to create a form in JSP, where visitors can filter Customers list by year and month.
    All I know is this piece of SQL that is convert the date to the dd-mm-yyyy format:
    SELECT TO_CHAR(reg_date,'dd-mm-yyyy') from CustomersAny ideas of how this filtering possible? In my effort not to sound like a newbie wanting to be spoonfed, you can provide me link to external notes and resources, I'll really appreciate it.
    Thanks,
    Rightbrainer.

    Hi
    What part is your biggest problem?? I am not experienced in getting data out of a database, but the way to get a variable amount of data to show in a drop down menu, i have just messed around with for some time and heres how i solved it... In my app, what i needed was, a initial empty drop down list, and then using input from a text-field, users could add elements to a Vector that was passed to a JComboBox. Heres how.
    package jcombobox;
    import java.awt.*;
    import java.awt.event.*;
    import java.util.Vector;
    import javax.swing.*;
    public class Main extends JApplet implements ActionListener {
        private Vector<SomeClass> list = new Vector<SomeClass>();
        private JComboBox dropDownList = new JComboBox(list);
        private JButton addButton = new JButton("add");
        private JButton remove = new JButton("remove");
        private JTextField input = new JTextField(10);
        private JPanel buttons = new JPanel();
        public Main() {
            addButton.addActionListener(this);
            remove.addActionListener(this);
            input.addActionListener(this);
            buttons.setLayout(new FlowLayout());
            buttons.add(addButton);
            buttons.add(remove);
            add(dropDownList, "North");
            add(input, "Center");
            add(buttons, "South");
        public void actionPerformed(ActionEvent e) {
            if (e.getSource() == addButton) {
                list.addElement(new SomeClass(input.getText()));
                input.setText("");
            } else if (e.getSource() == remove) {
                int selected = dropDownList.getSelectedIndex();
                dropDownList.removeItemAt(selected);
        public void init(String[] args) {
            setSize(400,300);
            getContentPane().setLayout(new BorderLayout());
            getContentPane().add(new Main());
    }And that "SomeClass" is show here
    package jcombobox;
    public class SomeClass {
        private String text;
        public SomeClass(String input) {
            text = input;
        public String toString() {
            return text;
    }One of the things i struggled a lot with was to get the dropdown menu to show some usefull result. If the list just contains class references it will show the memory code that points to that class. Thats where the toString cones in handy. But it took me some time to figure that one out, a laugh here is welcome as it should have been obvious :-)
    When the app is as simple as this one, using a <String> vector would have been easier, but this is just to demonstrate how to place classes in a vector and get some usefull info out of it, hope this answered some of your question :-)
    The layout might have been easier to write, than using the toppanel created by the JApplet and then the two additional JPanels, but it was just a small app brewed together in 15 minutes. Please comments on my faults, so that i can learn of it.
    If you need any of the code specified more, please let me know. Ill be glad to,

  • Want to get sequence value from bean

    I want to get sequecne value in abean
    when i try to make this
            String EmpId = (String)JSFUtils.resolveExpression("#{bindings.EmpViewId.inputValue}");Error appear
    Caused by: java.lang.ClassCastException: oracle.jbo.domain.DBSequence cannot be cast to java.lang.String
    and when i tried
            DBSequence EmpId = (DBSequence)JSFUtils.resolveExpression("#{bindings.EmpViewId.inputValue}");another errpr appeared
    how can i catch this DBSequence value

    you did not mention your JDev version.
    For 10g it might be helpful:
    http://database.in2p3.fr/doc/oracle/Oracle_Application_Server_10_Release_3/web.1013/b25947/web_complex006.htm
    Example 19-49 Value Change Listener Method for Handling a File Upload Event
    String fileUploadLoc =
    FacesContext.getCurrentInstance().getExternalContext().
    getInitParameter("SRDemo.FILE_UPLOADS_DIR");
    if (fileUploadLoc == null) {
    // Backup value if context init parameter not set.
    fileUploadLoc = "/tmp/srdemo_fileuploads";
    //get svrId and append to file upload location
    DBSequence svrId =
    (DBSequence)ADFUtils.getBoundAttributeValue("SvrId");
    fileUploadLoc += "/sr_" + svrId + "_uploadedfiles";
    I don't know if it works for 11g too.
    NA
    http://nickaiva.blogspot.com/

  • How do I get values from a resultset using JDOM?

    I am very new to this and I dont have the slightest idea how to retrive values from a result and create a XML tree using JDOM
    Can someone please help me?
    I have the JDOM Parser installed on my machine.
    This is my code so far:
    import org.jdom.input.*;
    import org.jdom.*;
    import java.sql.*;
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class Display extends HttpServlet {
    public void doPost(HttpServletRequest rq, HttpServletResponse rs) throws IOException, ServletException
    rs.setContentType("text/html");
    PrintWriter out = rs.getWriter();
    try {
         Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
         Connection listcars_con = DriverManager.getConnection("jdbc:odbc:Cars");
         Statement listcars_statement = listcars_con.createStatement();
         ResultSet listcars_rs = listcars_statement.executeQuery("Select CarNr FROM cars");
    //Load the appropriate driver, establish a connection and create a statement which is used to execute the query that returns all the
    //columns from the cars table
    Document doc = new Document(new Element("rootElement"));
              listcars_statement.close();
              listcars_con.close();
    //close the connections
    catch (ClassNotFoundException cnfe)
    System.err.println(cnfe);
    } catch (SQLException sqlex) {
    System.err.println(sqlex);
    } catch (Exception er) {
    er.printStackTrace();
    } //closing bracket for doPost method
    } //closing bracket for class definition

    ResultSet object has nothing to do with XML... so the only way to it
    is just read each row/column in your resultset and then create
    XML record based on structure of your resultset - annoying job...
    Also you can try to use tool developed by Oracle which based
    on SQL select statement parses resultset into XML...
    Paul

  • Problem in Retrieve Image from DB and display in the JSP page

    Hi All,
    I did one JSP Program for retriveing image from DB and display in the JSP Page. But when i run this i m getting "String Value" output. Here i have given my Program and the output. Please any one help to this issue.
    Database Used : MS Access
    DSN Name : image
    Table Name: image
    Image Format: bmp
    Output : 1973956
    Sample Program:_
    <%@ page contentType="text/html;charset=windows-1252"%>
    <%@ page import="java.io.*" %>
    <%
         try{
              Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
              Connection conn = DriverManager.getConnection("jdbc:odbc:image");
              Statement st = conn.createStatement();
              ResultSet rs = st.executeQuery("SELECT images FROM image");
              String imgLen="";
              if(rs.next()){
                   imgLen = rs.getString(1);
                   out.println(imgLen.length());
              if(rs.next()){
                   int len = imgLen.length();
                   byte [] rb = new byte[len];
                   InputStream readImg = rs.getBinaryStream(1);
                   int index=readImg.read(rb, 0, len);
                   System.out.println("index"+index);
                   st.close();
                   response.reset();
                   response.setContentType("image/jpg");
                   response.getOutputStream().write(rb,0,len);
                   response.getOutputStream().flush();
         }catch(Exception ee){
              out.println(ee);
    %>
    Thanks,
    Senthilkumar S

    vishruta wrote:
    <%
    %>Using scriptlets is asking for trouble. Java code belongs in Java classes. Use a Servlet.
                   out.println(imgLen.length());Your JSP was supposed to write an image to the output and you wrote some irrelevant strings to the output before? This will corrupt the image. It's like opening the image in a text editor and adding some characters before to it.
                   byte [] rb = new byte[len];Memory hogging. Don't do that.
              out.println(ee);You should be throwing exceptions and at least printing its trace, not sending its toString() to the output.
    You may find this article useful to get an idea how this kind of stuff ought to work: [http://balusc.blogspot.com/2007/04/imageservlet.html].

  • Passing value from JApplet to Jsp page

    Hello,
    How can i pass a value that is entered in a JTextArea in a JApplet and fetch the entered value from JTextArea and display it in a JSP page.
    It would be kindful if someone could help me with this problem.
    Regards
    Sanam

    hello,
    Thanks for ur reply,
    Sorry to say that i did not understand where to implement ur code in my code.
    Below is my code could u plz tell me where do i put in ur code.
    My code works fine u can compile it.
    javac *.java;
    appletviewer BIA.java
    Can u plz tell the JSP code.
    It would be very kindful if u could please help me.
    Thank you
    //**************** BIA.java***********
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.geom.*;
    import java.awt.image.BufferedImage;
    import java.io.*;
    import java.net.*;
    import javax.imageio.ImageIO;
    import javax.swing.*;
    import java.util.Vector;     
    import java.applet.*;     
    import java.awt.image.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import java.lang.reflect.Field;
    <applet code = "BIA" width = 500 height = 500>
    </applet>
    public class BIA extends JApplet
         public static Container cp;
         public BIAP panel;     
         public TB action;
         public void init()
              panel = new BIAP();
              action = new TB(panel);
              action.setLayout(new GridLayout(2,2));     
              cp = getContentPane();
              cp.setLayout(new BorderLayout());
              cp.add(action, "North");
              cp.add(new JScrollPane(panel));
              repaint();
    //******************* BIAP.java*************
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.geom.*;
    import java.awt.image.BufferedImage;
    import java.io.*;
    import java.net.*;
    import javax.imageio.ImageIO;
    import javax.swing.*;
    import java.util.Vector;     
    import java.applet.*;     
    import java.awt.image.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import java.lang.reflect.Field;
    class BIAP extends JPanel
         public BIA bia;
         public BufferedImage image;
         public double scale, scaleInc;
         public JTextArea jt;
         public BIAP()
              loadImage();
              setBackground(Color.white);
              scale = 1.0;
              scaleInc = 0.01;
              setLayout(null);
              jt = new JTextArea("Welcome");
              jt.setBounds(0,0, 90,30);
              add(jt);     
              repaint();
         protected void paintComponent(Graphics g)
              super.paintComponent(g);
                   Graphics2D g2 = (Graphics2D)g;
              g2.setRenderingHint(RenderingHints.KEY_INTERPOLATION,
                        RenderingHints.VALUE_INTERPOLATION_BICUBIC);
              int w = getWidth();
              int h = getHeight();
              int imageWidth = image.getWidth();
              int imageHeight = image.getHeight();
              int x = (w - imageWidth)/2;
              int y = (h - imageHeight)/2;
              g2.drawImage(image, x, y, this);
         private void loadImage()
              String fileName = "Terragen___Losing_Grip_by_Blackheart6004.jpg";
              try
              URL url = getClass().getResource(fileName);
              System.out.println(url);
              image = ImageIO.read(url);
              catch(MalformedURLException mue)
              System.out.println("url: " + mue.getMessage());
              catch(IOException ioe)
              System.out.println("read: " + ioe.getMessage());
         public Dimension getPreferredSize()
              Dimension d = new Dimension();
              d.width = (int)(scale * image.getWidth());
              d.height = (int)(scale * image.getHeight());
              return d;
         //method used for Zoom Operation
         public void setScale (int inc)
              scale += inc * scaleInc;
              revalidate();
              repaint();
    //************************** TB*********************
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.geom.*;
    import java.awt.image.BufferedImage;
    import java.io.*;
    import java.net.*;
    import javax.imageio.ImageIO;
    import javax.swing.*;
    import java.util.Vector;     
    import java.applet.*;
    import java.awt.image.*;
    import javax.swing.*;
    import javax.swing.event.*;
    class TB extends JPanel
         BIAP panel;
         JButton save = new JButton("Save");
         public TB(BIAP biap)
              panel = biap;
              ActionListener sa = new ActionListener()
                   public void actionPerformed(ActionEvent e)          
                        JButton button = (JButton)e.getSource();
                        if(button == save)
                             //panel.fileSave();
              save.addActionListener(sa);
              add(save);
    }

Maybe you are looking for

  • Line item text

    Hi All, In a particular line item while Billing, is it possible to maintain text for all the quantities. Eg:- For a line item we have 10 quantities, now, for each of these 10 quantities we would like to maintain text. Please help as to how can we map

  • How to clear device/bundle errors

    Hi all: I manage about 100 PCs with ZCM 11.2.4. I need a way to clear all device/bundle error messages, both for bundles and policies, so that the icons on ZCC all show clear. I know I can delete all error messages, but how do I clear all bundle erro

  • Downpayment + Delivery Billing

    Can anyone advise if we can a order item that can trigger downpayment request and subsequently used for delivery related billing? Thanks Peter

  • Missing information in full editor

    Please help. When I open a photo in full edit, the tab is shown just under the options bar but on the photo there is no minimise/maximise/close. How do I get these

  • IPhone 5s si riavvia spesso

    Salve, il mio iphone 5s si riavvia troppo spesso, anche 2/3 volte consecutivamente e ciò accade praticamente tutti i giorni! E' un problema di ios7? Ho già ripristinato da dfu (senza ripristinare backup) ma non ho risolto il problema