Graphics page in pint method

I have a GUI app that features two JPanels within a split pane. The left pane allows the user to choose a picture file, and the right pane is supposed to display the picture as tiled. Problem is, with the (Graphics page) parameter of the paint method, the GUI code erases the file chooser panel and paints over it. I expected that.
Question: Is there another paint method or way to draw tiled pictures within a certain JPanel without drawing over the entire page?

Sorry about the misspelling in the subject: it should be "print" method, not "pint".

Similar Messages

  • Redirect page with POST method in JSTL

    how to redirect page with POST method in JSTL.
    below is the code that i make, but the page redirected with GET method,
    so, the URL shown as http://localhost:8080/tes2/coba2.jsp?nama=saya
    how to hide the parameter, so it didn't show at the URL..??
    anybody help me..??
    server1 -> coba1.jsp
    <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
    <html>
    <head>
    <title>coba1</title>
    </head>
    <body>
    <c:url value="http://localhost:8080/tes2/coba2.jsp" var="displayURL">
      <c:param name="nama" value="saya"/>
    </c:url>
    <c:redirect url="${displayURL}"/>
    </body>
    </html>server2->coba2.jsp
    <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
    <html>
    <head>
    <title>coba2</title>
    </head>
    <body>
    <c:forEach items="${param}" var="currentParam">
            <li><c:out value="${currentParam.key}" />
                = <c:out value="${currentParam.value}" /></li>
          </c:forEach>
    </body>
    </html>

    There are other two way communications methods as well. One such would be:
    Server1Page1: Take response with parameters.  Use HttpURLConnection to make a request to DataInputServlet
                  on Server2 and send the parameters there with a POST operation
    Server2DataInputServer: Takes request with data in it and starts a new session.  Puts the data into the session and
                  returns the session id to the requester
    Server1Page1: Reads the response from the DataInputServer (the session id) and generates a sendRedirect to
                  Server2's display page using the session id.  Server1Page1 is now done.
    Server2Page1: Gets a request from the client with the session id, and pulls the parameters out of the session.  Then
                  can continue as normal.Server2Page1 can also do a quick refresh to itself not using the session id as well, which will keep the URL visible by the client relatively clean.

  • Looking for a graphical page  counter

    hi all
    i'm searching a graphical page counter, in order to place it in a simple html page
    anyone can tell me where to look?
    thanx
    sandro

    http://www.abacuscounters.com
    Sorry, i haven't finished it, but when i have, it will have been worth the wait.

  • Why are the graphics/page in facebook suddenly smaller font and images? Is not happening in IE and screen resolution is correct.

    Why are the graphics/page in facebook suddenly smaller font and images? Is not happening in IE and screen resolution is correct.

    I heard back from Nike+ support and they said that there will be newer pics soon and it also appears that this corrected itself for my runs, but not the user pic, I only get girly options, I wouldn't mind a picture of a guy on 'ROIDS!!! Just kidding, but something less feminine or cartoon like, I'm trying to be serious about this and the site should reflect that.

  • Can't print large graphic pages

    In my documents that have high resolution graphics, the page won't print. Intermittently I can get it to print, but not usually. This is my process: I paste the clipart or photo into a paint doc after setting the document resolution at 300dpi. I then copy it and paste it into word processing (this is the method I found out on the discussion forum so the graphics don't look pixelated). But if I have 4 or more of these on one page, it won't print.
    I found Peggy's suggestion and dumped my Appleworks preference files, and it worked for 3 pages. Now it doesn't work anymore. Help?
    G5   Mac OS X (10.3.9)  

    Welcome to Apple Discussions Eagle saint
    I think the problem is that the graphic is just too big, memory-wise. What is the original source of the images? Are you trying high resolution to improve the print quality? I have a couple of suggestions that might help.
    Open the images in Preview or the wonderful shareware program GraphicConverter & Save As... PICT (use Export in Preview in OS X 10.2 or 10.3). Insert or drag & drop the PICT images in an AppleWorks draw document. You'll have a lot more control over placement in draw. AppleWorks will change the resolution of any graphic except PICT to 72 dpi. PICT will retain the original resolution. Using the paint module leads to "pixelated" images.
    Turn on Fractional Character Widths on in Preferences > General > Topic: Text. Even though this is a text setting, it does help print quality.
    Peggy

  • LOGO required in ALV top of page using factory method

    Hi,
    I am doing an ALV using factory method of class Cl_SALV_TABLE. Can any one help me about putting a LOGO on the top of page.
    Thanks in advance.
    Amitava

    Hi,
    In START-OF-SELECTION.
    put form to display header
    like PERFORM build_header
    gr_table->display( ).
    then...
    in FORM
    FORM build_header.
    lr_grid  TYPE REF TO cl_salv_form_layout_grid,
    lr_logo  TYPE REF TO cl_salv_form_layout_logo,
    create object lr_logo.
      lr_logo->set_left_content( lr_grid ).
      lr_logo->set_right_logo( 'LOGO_NAME' ).
    * Set the element top_of_list
      gr_table->set_top_of_list( lr_logo ).
    ENDFORM.
    thanx.

  • Is it possible to Forward to another adf page in ReturnListener method?

    There is button in the page. It is used to pop up a dialog. After the dialog is returned. The ReturnListener of the button is triggered. I want to forward to another adf page in the ReturnListener.
    I searched the forum and found the following page:
    Re: Forward to another adf page from inside onPageLoad event
    I tried all the methods mentioned above, but all of them failed.
    Is there any other solutions?
    Regards,
    Jason

    I had the same problem with a return listener on a commandmenuitem. The navigation doesn't work because there is no partial submit.
    The workaround is to construct a menu item from a commandlink and objectimage. It looks and works the same as the commandmenuitem but you can set partialsubmit=true.
    For example:
    <af:panelGroup layout="vertical">
    <af:panelHorizontal>
    <af:objectSpacer width="10" height="10"/>
    <af:commandLink id="linkButIcon" useWindow="true"
    action="dialog:GoLinkedMatters"
    windowHeight="#{backing_app_ea_LinkedMatters.windowHeight}"
    windowWidth="#{backing_app_ea_LinkedMatters.windowWidth}"
    returnListener="#{backing_app_summary_DPSummary.linkedMattersReturn}"
    partialSubmit="true">
    <af:objectImage source="/images/link.gif"/>
    </af:commandLink>
    </af:panelHorizontal>
    <af:commandLink id="linkButLink"
    useWindow="true"
    textAndAccessKey="#{res['esolve.toolbar.links']}"
    action="dialog:GoLinkedMatters"
    windowHeight="#{backing_app_ea_LinkedMatters.windowHeight}"
    windowWidth="#{backing_app_ea_LinkedMatters.windowWidth}"
    returnListener="#{backing_app_summary_DPSummary.linkedMattersReturn}"
    inlineStyle="font-size:8.0pt;"
    partialSubmit="true"/>
    </af:panelGroup>

  • Problem moving a graphic constructed in a method...

    I am having a problem getting the graphic i made in the method "person" to move in response to the scrollbars and button... I'm sure im just missing something really simple... Thanks for your help.
    import java.applet.*;
    import java.awt.*;
    import java.awt.event.*;
    public class stuff3 extends Applet implements ActionListener, AdjustmentListener {
    private Scrollbar personH, personV;
    private int count = 0, personHvalue, personVvalue, jumpV, jumpH;
    Button jump;
    Label hLabel, vLabel;
    private boolean clickedYet = false;
    int newH = (jumpH + personHvalue);
    int newV = (jumpV + personVvalue);
         public void init() {
              hLabel = new Label("Horizontal Movement:");
                 add(hLabel);
              personH = new Scrollbar(Scrollbar.HORIZONTAL, 0,0,0,301);
              add(personH);
              personH.addAdjustmentListener(this);
              vLabel = new Label("Vertical Movement:" );
                 add(vLabel);
                 personV = new Scrollbar(Scrollbar.HORIZONTAL, 71,1,71,301);
              add(personV);
              personV.addAdjustmentListener(this);
              jump = new Button("Jump!");
              jump.addActionListener(this);
              add(jump); 
         public void actionPerformed(ActionEvent ev){
                 clickedYet = true;          
              jumpV =  (int)(50.0*Math.random()+10);
              jumpH =  (int)(50.0*Math.random()+10);
              count++;
                 repaint();
         public void adjustmentValueChanged(AdjustmentEvent e) {
                 personVvalue = personV.getValue();
                 personHvalue = personH.getValue();
                 repaint();
    private void person(Graphics p, int newH, int newV){
         p.drawOval(7+newH,2+newV,10,10);     
         p.drawLine(12+newH,12+newV,12+newH,20+newV);
         p.drawLine(6+newH,14+newV,12+newH,20+newV); 
         p.drawLine(19+newH,14+newV,12+newH,20+newV);   
         p.drawLine(12+newH,20+newV,5+newH,30+newV);
         p.drawLine(12+newH,20+newV,19+newH,30+newV);     
         public void paint(Graphics g){
                   g.drawString("Horizontal Movement = " + personHvalue, 15,40);
                   g.drawString("Vertical Movement = " +personVvalue, 205,40);
                   g.drawString("Horizontal Jump Movement =" + jumpH, 15,50);
                   g.drawString("Vertical Jump Movement = " + jumpV, 205,50);
                   g.drawString("New Horizontal Location = " + (personHvalue + jumpH),15,60);
                   g.drawString("New Vertical Location = " + (personVvalue + jumpV),205,60);
                 g.drawString("Count = " + count, 15,70);          
              if(clickedYet){
                   if(count <6 && count >0){  // number of presses is 1 to 5
                        g.setColor(Color.darkGray);
                           g.fillRect(0,71,350,350);
                           g.setColor(Color.black);
                      else {
                      if(count >=6 && count <=10){ // number of presses is 6 to 10
                           g.setColor(Color.red);
                           g.fillRect(0,71,350,350);
                           g.setColor(Color.black);
                      else{
                      if(count >=11 && count <=15){ // number of presses is 11 to 15
                           g.setColor(Color.green);
                           g.fillRect(0,71,350,350);
                           g.setColor(Color.black);
              person(g, newH, newV);     
    //<applet code = "stuff3.class" height=400 width=442> </applet>
         

    ok, heres an update...
    it works in the 2nd and 3rd IF...THEN...ELSE statements...
    i can't get it to appear in the first one...
    any ideas?

  • UIX/BC4J:  Page properties/Events/Methods

    The following is code for a UIX page event handler and a method that attempts to locate the data that is selected from a bc4j:table, use it, and then handle redirection to the next page.
    I had to comment out the setPageProperty block due to an error, oracle.jbo.Key, that keeps the method from running. This also means my page property is not available for use by the method.
    When the method runs I expected to be able to see the row that was selected in the table by virtue of the findRowByKey ... keyBinding ... selectionKey. Instead, the return value for the line: Row row = vo.getCurrentRow(); is always the last record in the view object.
    This led me to the alternative plan to create a page property for the selectedKey and use vo.getRow(key) to get the record. This won't work for me because I can't get the page property to work.
    Can you help me with my understanding/syntax please?
    **** UIX Event Handler ****
    <event name="getemployee">
    <bc4j:findRootAppModule name="AppModule">
    <bc4j:findViewObject name="VO">
    <bc4j:findRowByKey>
    <bc4j:keyBinding>
    <bc4j:selectionKey name="viewTable" key="key"/>
    </bc4j:keyBinding>
    <bc4j:handlers>
    <!-- Gives page error: oracle.jbo.Key -->
    <!--
    <bc4j:setPageProperty name="selectedKey">
    <bc4j:selectionKey name="viewTable" key="key"/>
    </bc4j:setPageProperty>
    -->
    <method class="PageController" method="getInfo" />
    </bc4j:handlers>
    </bc4j:findRowByKey>
    </bc4j:findViewObject>
    </bc4j:findRootAppModule>
    </event>
    **** Method that should use page property to display record from view object. ****
    public static synchronized EventResult getEmployeeInfo(BajaContext context,
    Page page,
    PageEvent event) {
    ViewObject vo = ServletBindingUtils.getViewObject(context);
    String selectedKey = page.getProperty("selectedKey");
    System.out.println("selectedKey: " + selectedKey); //null
    // I am hoping to get the property here.
    //Row row = vo.getRow(selectedKey);
    Row row = vo.getCurrentRow();
    System.out.println("Current Info- Item1:" + row.getAttribute("Item1") +
    ", Item2: " + row.getAttribute("Item2"));
    }

    Hello Vincent,
    I'm not sure why it does not work. Perhaps you haven't set the keystamp in your table?
    <bc4j:keyStamp>
    <bc4j:rowKey name="key"/>
    </bc4j:keyStamp>
    Besides your code tries to get the row in two times. Once in your event handler and ones in your method. That's not necessary, just do it once, either in your UIX page or in your Java method.
    If you do it in your UIX page, you can get the row directly in your method. Here is an example:
    UIX
    <bc4j:findRootAppModule name="appModule">
    <bc4j:findViewObject name="viewObject">
    <bc4j:findRowByKey>
    <bc4j:keyBinding>
    <bc4j:selectionKey name="viewTable" key="key"/>
    </bc4j:keyBinding>
    <bc4j:handlers>
    <method class="..." method="doSomething" />
    </bc4j:handlers>
    </bc4j:findRowByKey>
    <bc4j:executeQuery/>
    </bc4j:findViewObject>
    </bc4j:findRootAppModule>
    Then you can access row in your method
    Row row = (Row)bajaContext.getProperty("http://xmlns.oracle.com/uix/bc4j", "row");
    Regards,
    Christian

  • How to load multiple HTML5 canvas on the same page (the proper method)

    Hi,
    I've been struggling to load multiple canvas animations on the same page. At the beggining I thought that exporting the movies with different namespaces and reloading the libraries in a sequential flow might work, but it doesn't. It always loads just the last animation loaded. More info here: Coding challenge: what am I doing wrong?
    Here is a sample of what I'm doing:
    1st: Publish two flash movies with custom namespaces for "lib" set in the "publish settings": "libFirst" and "libSecond".
    2nd: Edit the canvas tags in the HTML page. One called "firstCanvas" and the other one called "secondCanvas"
    3rd: Edit the javascript like this:
            <script>
                // change the default namespace for the CreateJS libraries:
                var createjsFirst = createjsFirst||{};
                var createjs = createjsFirst;
            </script>
            <script src="//code.createjs.com/easeljs-0.7.1.min.js"></script>
            <script src="//code.createjs.com/tweenjs-0.5.1.min.js"></script>
            <script src="//code.createjs.com/movieclip-0.7.1.min.js"></script>
            <script src="{{assets}}/js/first.js"></script>
            <script>
                function initFirstAnimation() {
                    var canvas, stage, exportRoot;
                    canvas = document.getElementById("firstCanvas");
                    exportRoot = new libFirst.first();
                    stage = new createjsFirst.Stage(canvas);
                    stage.addChild(exportRoot);
                    stage.update();
                    createjsFirst.Ticker.setFPS(libFirst.properties.fps);
                    createjsFirst.Ticker.addEventListener("tick", stage);
            </script>
            <script>
                // change the default namespace for the CreateJS libraries:
                var createjsSecond = createjsSecond||{};
                var createjs = createjsSecond;
            </script>
            <script src="//code.createjs.com/easeljs-0.7.1.min.js"></script>
            <script src="//code.createjs.com/tweenjs-0.5.1.min.js"></script>
            <script src="//code.createjs.com/movieclip-0.7.1.min.js"></script>
            <script src="{{assets}}/js/second.js"></script>
            <script>
                function initSecondAnimation() {
                    var canvas, stage, exportRoot;
                    canvas = document.getElementById("secondCanvas");
                    exportRoot = new libSecond.second();
                    stage = new createjsSecond.Stage(canvas);
                    stage.addChild(exportRoot);
                    stage.update();
                    createjsSecond.Ticker.setFPS(libSecond.properties.fps);
                    createjsSecond.Ticker.addEventListener("tick", stage);
            </script>
    <body onload="initFirstAnimation(); initSecondAnimation();">
    Could someone please reply with the best practice on how to do this? If possible, without the need to reload all the libraries...
    If I only need to show one flash movie at a time, would it be more efficient to cut & paste the canvas tag using jQuery in the DOM and reloading a different lib on it?
    Many thanks!
    #flash #reborn

    I was able to fix it. At the end, it was easier than I thought. Just have to publish using a different "lib" namespace for each movie, load all the scripts at the end of the <body> and then add the following to the onload or ready events:
    $(document).ready(function () {
            var canvas, stage, exportRoot;
            // First movie
            canvas = document.getElementById("firstCanvas");
            exportRoot = new libFirst.first();
            stage = new createjs.Stage(canvas);
            stage.addChild(exportRoot);
            stage.update();
            createjs.Ticker.setFPS(libFirst.properties.fps);
            createjs.Ticker.addEventListener("tick", stage);
            // Second movie
            canvas = document.getElementById("secondCanvas");
            exportRoot = new libSecond.second();
            stage = new createjs.Stage(canvas);
            stage.addChild(exportRoot);
            stage.update();
            createjs.Ticker.setFPS(libSecond.properties.fps);
            createjs.Ticker.addEventListener("tick", stage);
            // Third movie
            canvas = dument.getElementById("thirdCanvas");
            exportRoot = new libThird.third();
            stage = new createjs.Stage(canvas);
            stage.addChild(exportRoot);
            stage.update();
            createjs.Ticker.setFPS(libThird.properties.fps);
            createjs.Ticker.addEventListener("tick", stage);

  • Need more tutorial to create graphical page

    I need more instrauction to created page, like insert a link, images position, and styles edit, and the color, etc, is there any tutorial had more detail about this direction?
    thanks

    Hi,
    all tutorials are up on otn.oracle.com/products/jdev
    Also worth reading is the developer guide: http://download-uk.oracle.com/docs/html/B25947_01/toc.htm
    For styles and colors, have a look at what it says about skinning
    Frank

  • System Monitoring Graphics- Page not opening..

    We are trying to setup the System monitoring setup between Solman and ECC, All the config part done using simulator software.
    Now when I click DSWP - operations - System Monitoring receive an error message page cannot be displayed..
    But when I open the link from windows server its working fine.
    Couls somone reply how to fix it ?.
    Thanks
    Thirumal

    Hi Nelis,
    I cleared the Cache and temporary internet files, and rebooted the sap and windows server too.
    still shows the same error like page cannot be displayed.
    MY SAP Solman system Installation number is SAP-INTERN and ECC installation number is "Initial" with licensed one till december 2008.
    1.in this is it a problem with installation number ?..
    2. Is their Any one configured the System monitoring with installaton number INITIAL or SAP-INTERN ?
    Thanks
    Thirumal.

  • Handing Graphics Object To Run() Method

    Hi,
    I have written code that draws 20 x 20 lines over a bufferedimage and the performs calculations on each of the cells created by this division.
    I want to be able to show a blue square over the cell currently being worked on. As the calculations progress the square moves from cell to cell until complete.
    The problem I face is that when i have my buffered image displayed and then run through the calculations the whole process is done so fast that you never see the blue square moving you just see the completed state. The obvious answer to this is to use a thread but how do I hand "Graphics g" to a thread as an argument? Whenever I try
    public void run(Graphics g)I get a compile error saying that the class should be declared abstract. Is it ever possible to hand run() an argument?
    Any other suggestions as to how I can show this drawing process slow enough to be visible to the user?

    Look at this:
    import java.awt.event.*;
    import java.awt.*;
    public class Barc extends Frame 
         mapPanel     map  = new mapPanel();
         Calc         calc = new Calc(map);
    public Barc()
         addWindowListener(new WindowAdapter()
        {     public void windowClosing(WindowEvent ev)
              {     dispose();
                   System.exit(0);}});
         setBounds(10,10,500,440);
         add(map);     
         setVisible(true);
         new Thread(calc).start();
    public class mapPanel extends Panel
         int cell = -1;
         int xc,yc;
    public mapPanel()
    public void paintCell(int c)
         if (cell != -1)
              yc = (cell/20)*20+2 ;
              xc = (cell%20)*20+2;
               repaint(xc,yc,17,17);
         cell = c;
         yc = (cell/20) * 20+2 ;
         xc = (cell%20)*20+2;
         repaint(xc,yc,17,17);
    public void update(Graphics g)
         paint(g);
    public void paint(Graphics g)
         Rectangle r = g.getClipBounds();
         g.setColor(Color.pink);
         g.fillRect(r.x,r.y,r.width,r.height);
         g.setColor(Color.black);
         for (int x=0; x < 21; x++) g.drawLine(x*20,0,x*20,400);
         for (int y=0; y < 21; y++) g.drawLine(0,y*20,400,y*20);
         if (cell != -1)
              g.setColor(Color.blue);
              g.fillRect(xc,yc,17,17);
    public class Calc implements Runnable
         mapPanel  map;
    public Calc(mapPanel m)
         map       = m;
    public synchronized void run()
         int    i = 0;     
         double d = 1000;
         while (i < 400)
               map.paintCell(i++);
              for (int r=0; r < 1111111; r++) d = d/124.67*131.46;
    public static void main(String[] args )
         new Barc();
    Noah

  • HT4972 My iPhone 4S froze and was locked at the connect-to-iTune graphic page after I attempted to upgrade the software to 5.1.1. I don't know what to do with it now!

    My iPhone 4S froze and was locked at the connect-to-iTune graphic screen when I attempted to upgrade the software to 5.1.1. It is now dead!

    5.0.2 has not been released, thus you can not upgrade.
    Stedman

  • Switchable graphics - unsolved by existing methods

    Hello,
    I have an ENVY 14 1260se (Beats edition). I can't remember the product number off the top of my head but that should lead to it. Purchased new a few years ago.
    Recently I cleaned it up of old programs and adware. The switchable graphics, which was "fixed mode" from the factory, no longer functions. When I pull up the option for it, the "current GPU" shows blank and clicking either option button (high performance ati/power saving Intel) presses, but does nothing. It is in the Intel mode and only that one shows up in the Device Manager.
    I already reinstalled all relevant drivers from the HP site (intel, amd, BIOS) to no change.
    I hid/unhid the Appdata and Users folders.
    BIOS startup gave no option for switchable graphics.
    I fear I deleted something among my cleanup to cause this.
    I really want to go back to being able to play non-demanding games that are terribly slow on the Intel graphics.
    What can I do?

    I also, while cleaning, installed numerous Windows updates and Avira, if that is relevant.

Maybe you are looking for

  • Flash CFGRID Insert Row Problem

    I think others have posted similar issues, but I've been unable to find a resolution to it. I have a Flash grid in an Accordion page that I need users to be able to insert data into. Most of the time, the grid will be empty when the user enters data.

  • Satellite L500-1KK - Which driver to use?

    Hi All! I have noticed that Intel have released new drivers for their 4500MHD graphic card, however, the one's released on Toshiba's site for my Satellite L500-1KK are older and are never updated as frequently as those released on Intel's site, my qu

  • Audio lost from Keynote 09 import to iPad

    I thought the recent Keynote for iPad software update was supposed to allow importing audio from Keynote 09 files. I still have no audio with these files on the iPad. Suggestions?

  • Can not login into itunes store bummer

    CAn't connect to the itunes store either, lukely i am not the only one.

  • Java ME SDK Tools 3.0.5 Integration NetBeans IDE 6.9.1

    I've installed the NetBeans IDE v 6.9.1 and Java ME SDK Tools v 3.0.5 on a Vista (build 6001) SP1 machine and everything worked just fine. I had a system failure, and had to (attempt) uninstall / re-install. After a clean install of the OS (Vista Hom