URGENT! Need help with scrolling on a JPanel!

Hello Guys! I guess there has been many postings about this subject in the forum, but the postings I found there.... still couldn't solve my problem...
So, straight to the problem:
I am drawing some primitive graphic on a JPanel. This JPanel is then placed in a JScrollPane. When running the code, the scrollbars are showing and the graphic is painted nicely. But when I try to scroll to see the parts of the graphics not visible in the current scrollbarview, nothing else than some flickering is happening... No movement what so ever...
What on earth must I do to activate the scroll functionality on my JPanel??? Please Help!
And yes, I have tried implementing the 'Scrollable' interface... But it did not make any difference...
Code snippets:
import java.awt.*;
import java.awt.event.*;
import java.awt.image.*;
import java.awt.geom.*;
import javax.swing.*;
import javax.swing.event.*;
import javax.swing.tree.*;
import java.util.*;
public class FilterComp extends JPanel {//implements Scrollable {
  protected DefaultMutableTreeNode root;
  protected Image buffer;
  protected int lastW = 0;
  protected int origoX = 0;
  protected final StringBuffer sb = new StringBuffer();
//  protected int maxUnitIncrement = 1;
  protected JScrollPane scrollpane = new JScrollPane();
   *  Constructor for the FilterComp object
   *@param  scrollpane  Description of the Parameter
  public FilterComp(JScrollPane scrollpane) {
    super();
//    setPreferredSize(new Dimension(1000, 500));
    this.setBackground(Color.magenta);
//    setOpaque(false);
    setLayout(
      new BorderLayout() {
        public Dimension preferredLayoutSize(Container cont) {
          return new Dimension(1000, 600);
    this.scrollpane = scrollpane;
    scrollpane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
    scrollpane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
    scrollpane.setPreferredSize( new Dimension( 500, 500 ) );
    scrollpane.getViewport().add( this, null );
//    scrollpane.getViewport().setScrollMode(JViewport.SIMPLE_SCROLL_MODE);
    repaint();
  public void paintComponent(Graphics g) {
    super.paintComponent(g);
    int w = getSize().width;
    if (w != lastW) {
      buffer = null;
    Graphics2D g2 = (Graphics2D) g;
    g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
    if (root != null) {
      int h = getHeight(root);
      if (buffer == null) {
        buffer = new BufferedImage(getWidth(), getHeight(), BufferedImage.TYPE_INT_ARGB);
        Graphics2D g3 = (Graphics2D) buffer.getGraphics();
        g3.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
        g3.setColor(Color.black);
        g3.setStroke(new BasicStroke(2));
        paint(g3, (w / 2) + origoX, 10, w / 2, root); 
      lastW = w;
      AffineTransform old = g2.getTransform();
      AffineTransform trans = new AffineTransform();
      trans.translate((w / 2) + origoX, (getHeight() - (h * 40)) / 2);
      g2.setTransform(trans);
      g2.drawImage(buffer, (-w / 2) + origoX, 0, null);
      g2.setTransform(old);
    updateUI();
   *  Description of the Method
   *@param  g  Description of the Parameter
  public void update(Graphics g) {
    // Call paint to reduce flickering
    paint(g);
   *  Description of the Method
   *@param  g2    Description of the Parameter
   *@param  x     Description of the Parameter
   *@param  y     Description of the Parameter
   *@param  w     Description of the Parameter
   *@param  node  Description of the Parameter
  private void paint(Graphics2D g2, int x, int y, int w, DefaultMutableTreeNode node) {
    if (node.getChildCount() == 2) {
      DefaultMutableTreeNode c1 = (DefaultMutableTreeNode) node.getChildAt(0);
      DefaultMutableTreeNode c2 = (DefaultMutableTreeNode) node.getChildAt(1);
      if (c1.getChildCount() == 0 && c2.getChildCount() == 0) {
        String s = c1.getUserObject().toString() + " " + node.getUserObject() + " " + c2.getUserObject();
        paint(g2, x, y, s);
      } else {
        g2.drawLine(x - (w / 2), y, x + (w / 2), y);
        Font f = g2.getFont();
        g2.setFont(new Font(f.getName(), Font.BOLD | Font.ITALIC, f.getSize() + 2));
        paint(g2, x, y, node.getUserObject().toString());
        g2.setFont(f);
        g2.drawLine(x - (w / 2), y, x - (w / 2), y + 40);
        g2.drawLine(x + (w / 2), y, x + (w / 2), y + 40);
        paint(g2, x - (w / 2), y + 40, w / 2, c1);
        paint(g2, x + (w / 2), y + 40, w / 2, c2);
    } else if (node.getChildCount() == 0) {
      paint(g2, x, y, node.getUserObject().toString());
   *  Description of the Method
   *@param  g2  Description of the Parameter
   *@param  x   Description of the Parameter
   *@param  y   Description of the Parameter
   *@param  s   Description of the Parameter
  private void paint(Graphics2D g2, int x, int y, String s) {
    y += 10;
    StringTokenizer st = new StringTokenizer(s, "\\", false);
    if (s.indexOf("'") != -1 && st.countTokens() > 1) {
      int sh = g2.getFontMetrics().getHeight();
      while (st.hasMoreTokens()) {
        String t = st.nextToken();
        if (st.hasMoreTokens()) {
          t += "/";
        int sw = g2.getFontMetrics().stringWidth(t);
        g2.drawString(t, x - (sw / 2), y);
        y += sh;
    } else {
      int sw = g2.getFontMetrics().stringWidth(s);
      g2.drawString(s, x - (sw / 2), y);
   *  Sets the root attribute of the FilterComp object
   *@param  root  The new root value
  public void setRoot(DefaultMutableTreeNode root) {
    this.root = root;
    buffer = null;
   *  Gets the root attribute of the FilterComp object
   *@return    The root value
  public DefaultMutableTreeNode getRoot() {
    return root;
   *  Gets the height attribute of the FilterComp object
   *@param  t  Description of the Parameter
   *@return    The height value
  private int getHeight(TreeNode t) {
    int h = 1;
    int c = t.getChildCount();
    if (c > 0) {
      if (c > 1) {
        h += Math.max(getHeight(t.getChildAt(0)), getHeight(t.getChildAt(1)));
      } else {
        h += getHeight(t.getChildAt(0));
    return h;
   *  Sets the x attribute of the FilterComp object
   *@param  x  The new x value
  public void setX(int x) {
    origoX = x;
   *  Gets the x attribute of the FilterComp object
   *@return    The x value
  public int getX() {
    return origoX;
   *  Gets the preferredScrollableViewportSize attribute of the FilterComp
   *  object
   *@return    The preferredScrollableViewportSize value
//  public Dimension getPreferredScrollableViewportSize() {
//    return getPreferredSize();
   *  Gets the scrollableBlockIncrement attribute of the FilterComp object
   *@param  r            Description of the Parameter
   *@param  orientation  Description of the Parameter
   *@param  direction    Description of the Parameter
   *@return              The scrollableBlockIncrement value
//  public int getScrollableBlockIncrement(Rectangle r, int orientation, int direction) {
//    return 10;
   *  Gets the scrollableTracksViewportHeight attribute of the FilterComp object
   *@return    The scrollableTracksViewportHeight value
//  public boolean getScrollableTracksViewportHeight() {
//    return false;
   *  Gets the scrollableTracksViewportWidth attribute of the FilterComp object
   *@return    The scrollableTracksViewportWidth value
//  public boolean getScrollableTracksViewportWidth() {
//    return false;
   *  Gets the scrollableUnitIncrement attribute of the FilterComp object
   *@param  r            Description of the Parameter
   *@param  orientation  Description of the Parameter
   *@param  direction    Description of the Parameter
   *@return              The scrollableUnitIncrement value
//  public int getScrollableUnitIncrement(Rectangle r, int orientation, int direction) {
//    return 10;
}

The Scrollable interface should be implemented by a JPanel set as the JScrollPane's viewport or scrolling may not function. Although it is said to be only necessary for tables, lists, and trees, without it I have never had success with images. Even the Java Swing Tutorial on scrolling images with JScrollPane uses the Scrollable interface.
I donot know what you are doing wrong here, but I use JScrollPane with a JPanel implementing Scrollable interface and it works very well scrolling images drawn into the JPanel.
You can scroll using other components, such as the JScrollBar or even by using a MouseListener/MouseMotionListener combination, but this is all done behind the scenes with the use of JScrollPane/Scrollable combination.
You could try this approach using an ImageIcon within a JLabel:
import java.awt.*;
import java.awt.event.*;
import java.awt.image.*;
import javax.swing.*;
import javax.swing.event.*;
public class Test extends JFrame {
     BufferedImage bi;
     Graphics2D g_bi;
     public Test() {
          super("Scroll Test");
          makeImage();
          Container contentPane = getContentPane();
          MyView view = new MyView(new ImageIcon(bi));
          JScrollPane sp = new JScrollPane(view);
          contentPane.add(sp);
          setSize(200, 200);
          setVisible(true);
     private void makeImage() {
          bi = new BufferedImage(320, 240, BufferedImage.TYPE_INT_ARGB);
          g_bi = bi.createGraphics();
          g_bi.setColor(Color.white);
          g_bi.fillRect(0,0,320,240);
          g_bi.setColor(Color.black);
          g_bi.drawLine(0,0,320,240);
     public static void main(String args[]) {
          Test test = new Test();
class MyView extends JLabel {
     ImageIcon icon;
     public MyView(ImageIcon ii) {
          super(ii);
          icon = ii;
     public void paintComponent(Graphics g) {
          g.drawImage(icon.getImage(),0,0,this);
}Robert Templeton

Similar Messages

  • Urgently need help with this

    Hi!!
    I urgently need help with this:
    When I compile this in Flex Builder 3 it says: The element type 'mx:Application' must be terminated by the matching end-tag '</mx:Application>'.
    but I have this end tag in my file, but when I try to switch from source view to desgin view it says, that: >/mx:Script> expected to terminate element at line 71, this is right at the end of the .mxml file. I have actionscript(.as) file for scripting data.
    This is the mxml code to terminate apllication tag which I did as you can see:
    MXML code:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" backgroundGradientAlphas="[1.0, 1.0]" backgroundGradientColors="[#007200, #000200]" width="1024" height="768" applicationComplete="popolni_vse()">
    <mx:HTTPService id="bazaMME" url="lokalnabaza/baza_MME_svn.xml" showBusyCursor="true" resultFormat="e4x"/>
    <mx:Script source="dajzaj.as"/>
    <mx:states>
    <mx:State name="Galerije">
        <mx:SetProperty target="{panel1}" name="title" value="Galerije MME"/>
        <mx:SetProperty target="{panel2}" name="title" value="opis slik"/>
        <mx:SetProperty target="{panel3}" name="title" value="Opis Galerije"/>   
        <mx:AddChild relativeTo="{panel1}" position="lastChild">
        <mx:HorizontalList x="0" y="22" width="713.09863" height="157.39436" id="ListaslikGalerije"></mx:HorizontalList>
                </mx:AddChild>
                <mx:SetProperty target="{text1}" name="text" value="MME opisi galerij "/>
                <mx:AddChild relativeTo="{panel1}" position="lastChild">
                    <mx:Label x="217" y="346" text="labela za test" id="izbr"/>
                </mx:AddChild>
                <mx:SetProperty target="{label1}" name="text" value="26. November 2009@08:06"/>
                <mx:SetProperty target="{label1}" name="x" value="845"/>
                <mx:SetProperty target="{label1}" name="width" value="169"/>
                <mx:SetProperty target="{Gale}" name="text" value="plac za Galerije"/>
            </mx:State>
            <mx:State name="Projekti"/>
        </mx:states>
    <mx:MenuBar id="MMEMenu" labelField="@label" showRoot="true" fillAlphas="[1.0, 1.0]" fillColors="[#043D01, #000000]" color="#9EE499" x="8" y="24"
             itemClick="dajVsebino(event)" width="1006.1268" height="21.90141">
           <mx:XMLList id="MMEmenuModel">
                 <menuitem label="O nas">
                     <menuitem label="reference podjetja" name="refMME" type="check" groupName="one"/>
                     <menuitem label="reference direktor" name="refdir" type="check" groupName="one"/>
                  <menuitem label="Kontakt" name="podatMME" groupName="one" />
                  <menuitem label="Kje smo" name="lokaMME" type="check" groupName="one" />
                 </menuitem>           
                 <menuitem type="separator"/>
                 <menuitem label="Galerija">
                     <menuitem label="Slovenija" name="galSvn" type="check" groupName="one"/>
                     <menuitem label="Nemčija" name="galDeu" type="check" groupName="one" />
                 </menuitem>
                 <menuitem type="separator"/>
                 <menuitem label="projekti">
                     <menuitem label="Slovenija" name="projSvn" type="check" groupName="one"/>
                     <menuitem label="Nemčija" name="projDeu" type="check" groupName="one" />
                     <menuitem label="Madžarska" name="projHun" type="check" groupName="one"/>
                 </menuitem>
             </mx:XMLList>                       
             </mx:MenuBar>
        <mx:Label x="845" y="10" text="25. November 2009@08:21" color="#FFFFFF" width="169" height="18.02817" id="label1"/>
        <mx:Label x="746" y="10" text="zadnja posodobitev:" color="#FFFFFF"/>
        <mx:Panel x="9" y="57" width="743.02814" height="688.4507" layout="absolute" title="Plac za Vsebino" id="panel1">
            <mx:Text x="0" y="-0.1" text="MME vsebina" width="722.95776" height="648.4507" id="Gale"/>
        </mx:Panel>
        <mx:Label x="197.25" y="748.45" color="#FFFFFF" text="Copyright © 2009 MME d.o.o." fontSize="12" width="228.73239" height="20"/>
        <mx:Label x="463.35" y="748.45" text="izdelava spletnih strani: FACTUM d.o.o." color="#FBFDFD" fontSize="12" width="287.60565" height="20"/>
        <mx:Panel x="759" y="53" width="250" height="705.07043" layout="absolute" title="Plac za hitre novice" id="panel3">
            <mx:Text x="0" y="0" text="MME novice" width="230" height="665.07043" id="text1"/>
            <mx:Panel x="-10" y="325.35" width="250" height="336.61972" layout="absolute" title="začasna panela" color="#000203" themeColor="#4BA247" cornerRadius="10" backgroundColor="#4B9539" id="panel2">
                <mx:Label x="145" y="53" text="vrednost" id="spremmen"/>
                <mx:Label x="125" y="78" text="Label"/>
                <mx:Label x="125" y="103" text="Label"/>
                <mx:Label x="0" y="53" text="spremenljivka iz Menuja:"/>
                <mx:Label x="45" y="78" text="Label"/>
                <mx:Label x="45" y="103" text="Label"/>
            </mx:Panel>
        </mx:Panel>
        <mx:Label x="9.9" y="10" text="plac za naslov MME vsebine" id="MMEnaslov" color="#040000"/>
         </mx:states></mx:Application>

    I know it's been a while but… did you fix this?
    It looks to me like you are terminating the <mx:Application> tag at the top. The opening tag should end like this: resultFormat="e4x">, not resultFormat="e4x"/> (Remove the /).
    Carlos

  • Hi, I need help with scrolling

    Hello I am Kevin Jin, I am working a huge project acually not that big, but I need help with five things, i mihgt have more things in my mind but here it is
    1. I need help with scrolling like where you have buttons for example or press on a navigation bar tab, then it goes to that specific pace of the page, for a one page website, for example some sites you press on contacts and gose down to the bottom of the page where the contacts place is located, not opening a new link.
    2.Second also I need help with navigation bar, where it fallows the scroll as it gose down, like for example when it is html the object is fixed to the top, and when you scroll down it will fallow it it,
    3.I need Parallex scrolling where you can have the timeline or animations run while you scroll in the meantime and have animation running all the time, for example the infographic site where the bees are fluying but still have seperate animations while you scroll
    4.I am so sorry i have two more to go, i appreciate your help, I would also like to ask if like looping each animations sperately, not looping the whole timeline, can it be possible to loop an animation while you have all the interactivity witht he site like looping seperately all the time, without interfeering with all the other animation
    5.I also are wondering if you can create multiple pages on one animate project, like multiple pages with html
    I just moved on to edge animate from html, and html was also beirf learn for me and mostly i was doing design work, and i thought getting out of graphic river and moving on the theme forest would be a better idea for me, thank you guys so much of the help and add me on skype : kevin2019170 or add me on facebook ; [email protected] or graphicriver, www.graphicriver.net/user/phantomore I would appriciate if you just would like contact me through SNS since I have that in hany 24 hours long, but the thred will also do, thank you doo much foryour help,
    P.S, I want also all the five things to work on one aimate project not interfeering with other ideas liek all five questions i had should run on one site,
    THANK YOU SO MUCH FOR YOUR HELP AND I APPRICIATE YOUR HELP!

    1.
    write this code in your button Click
    $('html,body').animate({scrollTop: sym.$("Your Symbole Name Here").offset().top}, "slow"); // scroll to the top of that symbol name
    Or :
    $('html,body').animate({"scrollTop":"600px"}, 750); // Higher value means slower , scroll to top page
    1 and 2 see this post http://forums.adobe.com/message/5531344#5531344
    3 use edge commons plugin http://www.edgedocks.com/edgecommons
    4.just put the animations behind eachother so when 1 is done, start with the animating the other symbol/div
    5. i thin its best just to make for every page a new project or make the site in muse.

  • Need Help with Scrolling Problem

    I have a JTree displayed in scrollpane. Based on search criterial I select the nodes where the search criteria is found. If the match is located off the screen further down into the tree, the node is highlighted but the scrollpane doesn't automatically scroll down to show it. Any help with this problem is appreciated.

    Wow.. Thanks. I thought I would need some fancy code to handle this problem. scrollPathToVisible did it for me. Thanks.

  • Urgent-Need help with code for Master data enhancement

    hi Experts,
    I have appended YMFRGR field(Table MARC) to 0MAT_PLANT_ATTR datasource.
    The key fields in the MARC table are MATNR and WERKS.Can anybody help with the user exit to populate this field,as am pretty new to ABAP.
    Thanks in advance

    Hi,
    go through this link which has the similar problem:
    https://forums.sdn.sap.com/click.jspa?searchID=1331543&messageID=2794783
    hope it helps.
    Thanks,
    Amith

  • Urgent - Need help with Lighting Effects Filter

    Hi,
    I need urgent help on something regarding the Lighting Effects filter in Adobe Photoshop CS5. I need lighting effect urgently to complete a project.
    I am using Photoshop CS5 on a Windows Vista computer in 64-bit mode.
    On the net it is given that you can run photoshop CS5 in 32-bit mode to use the lighting effects filter - both on Mac and PC.
    My Problem:
    While on the net it is given how to change from 64-bit to 32-bit and vice-versa, I have my Photoshop CS5 installed on 'E - Drive' and not on 'C - Drive' due to lack of space. I have followed all the instructions on how to open it in 32-bit mode on the net, but I still cannot use the lighting effects plugin.
    What I need is if someone could give simple and clear instructions on how to open Photoshop CS5 32-bit version instead of opening the default 64-bit version on Windows Vista - that would be great.
    Looking forward to answers.
    Thanks.

    That advice about running the 32 bit version of cs5 for the Render> Lighting Effects filter
    only pertains to the mac version of photoshop cs5.
    The lighting effects filter does work in the 64 bit version of photoshop cs5 on windows, your
    document just has to be 8 bits/channel and in the RGB Color mode (Image>Mode) same
    for using the lighting effects filter in the 32 bit version of cs5.
    Added: In general it's frowned upon installing photoshop on drives other than C drive.
    MTSTUNER
    Message was edited by: MTSTUNER

  • Urgent - need help with ring gradient

    Does anyone know how do I apply spectrum gradient to this circle as on pic (its a dry brush stroke that comes with illustrator)
    Please help, i tried everything

    this is in CS5. in CS6 and above you can make life much easier by using a gradient along a stroked circle.
    these are your ingredients: circle with the appropriate brush and a line with a stroke.
    rotate the line about one end however many steps you need for each colour (rotate tool, alt-click on the bottom of the path, use smart guides to pinpoint it).
    change each path to your colours. make a copy of the first colour (orange here) and paste in front (ctrl+F).
    select all the lines. make a blend (ctrl + alt + B).
    select the brushed circle. expand appearance (object > expand appearance). this particular one was a group, and we want a compound path, so I ungrouped it and made a compound path (ctrl + 8). position it over your colour wheel. make sure its in front.
    select both and make a clipping path (ctrl + 7).

  • URGENTLY NEED HELP WITH NESTED REPEAT REGION

    Im using dreamweaver to deevelop a page that displays questions in ann assessment to the user. First of all the page shows the assessment name to the user and then it gets some information about the questions in the assessment from the table called Item. It gets the Question_ID and then there is a repeat region which uses the Question_ID to display the questions in the assessment. There is a nested repeat region inside this which displays the possible answers the user can respond to the question with It gets this information from a table called outcome. The page should display each question and then all the possible answers but i am having problems and im not sure wether i am doing this in the correct way. What is wrong with my code? PLEASE HELP! can someone tell me what is going wrong and how i can fix this problem thamks.
    here is my code.
    Driver DriverassessmentRecordset = (Driver)Class.forName(MM_connAssessment_DRIVER).newInstance();
    Connection ConnassessmentRecordset = DriverManager.getConnection(MM_connAssessment_STRING,MM_connAssessment_USERNAME,MM_connAssessment_PASSWORD);
    PreparedStatement StatementassessmentRecordset = ConnassessmentRecordset.prepareStatement("SELECT Assessment_ID, Assessment_Name, Time_Limit, Display_Random, Record_Answers FROM Assessment.assessment WHERE Assessment_ID = '" + session.getValue("AssessmentID") + "' ");
    ResultSet assessmentRecordset = StatementassessmentRecordset.executeQuery();
    boolean assessmentRecordset_isEmpty = !assessmentRecordset.next();
    boolean assessmentRecordset_hasData = !assessmentRecordset_isEmpty;
    Object assessmentRecordset_data;
    int assessmentRecordset_numRows = 0;
    %>
    <%
    Driver DriveritemRecordset = (Driver)Class.forName(MM_connAssessment_DRIVER).newInstance();
    Connection ConnitemRecordset = DriverManager.getConnection(MM_connAssessment_STRING,MM_connAssessment_USERNAME,MM_connAssessment_PASSWORD);
    PreparedStatement StatementitemRecordset = ConnitemRecordset.prepareStatement("SELECT Question_ID, Assessment_ID FROM Assessment.item WHERE Assessment_ID = '" + session.getValue("AssessmentID") + "' ");
    ResultSet itemRecordset = StatementitemRecordset.executeQuery();
    boolean itemRecordset_isEmpty = !itemRecordset.next();
    boolean itemRecordset_hasData = !itemRecordset_isEmpty;
    Object itemRecordset_data;
    int itemRecordset_numRows = 0;
    %>
    <%
    Driver DriverquestionRecordset = (Driver)Class.forName(MM_connAnswer_DRIVER).newInstance();
    Connection ConnquestionRecordset = DriverManager.getConnection(MM_connAnswer_STRING,MM_connAnswer_USERNAME,MM_connAnswer_PASSWORD);
    //PreparedStatement StatementquestionRecordset = ConnquestionRecordset.prepareStatement("SELECT Question_Type, Number_Outcomes, Question_Wording FROM Answer.question WHERE Question_ID = '" + (((itemRecordset_data = itemRecordset.getObject("Question_ID"))==null || itemRecordset.wasNull())?"":itemRecordset_data) +"' ");
    //ResultSet questionRecordset = StatementquestionRecordset.executeQuery();
    %>
    <%
    Driver DriveroutcomeRecordset = (Driver)Class.forName(MM_connAnswer_DRIVER).newInstance();
    Connection ConnoutcomeRecordset = DriverManager.getConnection(MM_connAnswer_STRING,MM_connAnswer_USERNAME,MM_connAnswer_PASSWORD);
    PreparedStatement StatementoutcomeRecordset = ConnoutcomeRecordset.prepareStatement("SELECT Outcome_Number, Outcome_Text, Score, Feedback FROM Answer.outcome WHERE Question_ID = '" +itemRecordset.getObject("Question_ID")+ "' ");
                     ResultSet outcomeRecordset = StatementoutcomeRecordset.executeQuery();
                     boolean outcomeRecordset_isEmpty = !outcomeRecordset.next();
                    boolean outcomeRecordset_hasData = !outcomeRecordset_isEmpty;Object outcomeRecordset_data;
                  int outcomeRecordset_numRows = 0;
    %>
    <%
    int Repeat1__numRows = -1;
    int Repeat1__index = 0;
    itemRecordset_numRows += Repeat1__numRows;
    %>
    <%
    int Repeat2__numRows = -1;
    int Repeat2__index = 0;
    assessmentRecordset_numRows += Repeat2__numRows;
    %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/assessment.dwt.jsp" codeOutsideHTMLIsLocked="false" -->
    <head>
    <!-- InstanceBeginEditable name="doctitle" -->
    <title>Assessment</title>
    <!-- InstanceEndEditable -->
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <!-- InstanceBeginEditable name="head" -->
    <!-- InstanceEndEditable -->
    <link href="../css/style.css" rel="stylesheet" type="text/css" />
    </head>
    <body>
    <table width="1000" border="0" cellpadding="0" cellspacing="0">
      <!--DWLayoutTable-->
      <tr>
        <td height="190"><img src="../img/assessment_login.png" alt="" name="navigation" width="1000" height="190" border="0" id="navigation" /></td>
      </tr>
      <tr>
        <td height="19"><!--DWLayoutEmptyCell--> </td>
      </tr>
      <tr>
        <td height="19"><!-- InstanceBeginEditable name="main" -->
        <table>
          <tr>
            <td width="990">Assessment Name:<%=(((assessmentRecordset_data = assessmentRecordset.getObject("Assessment_Name"))==null || assessmentRecordset.wasNull())?"":assessmentRecordset_data)%> </td>
            </tr>
          <tr>
            <td><% int count = 1; %> </td>
          </tr>
          <tr>
            <td valign="top"><table>
                <% while ((itemRecordset_hasData)&&(Repeat1__numRows-- != 0)) { %>
    <tr>
                  <td width="21"> 
                     </td>
                  <td width="86">Question:<%= count %></td>
                </tr>
                <tr>
                  <td></td>
                  <td>
                     <% 
                     PreparedStatement StatementquestionRecordset = ConnquestionRecordset.prepareStatement("SELECT Question_Type, Number_Outcomes, Question_Wording FROM Answer.question WHERE Question_ID = '" +itemRecordset.getObject("Question_ID")+"' ");
                     ResultSet questionRecordset = StatementquestionRecordset.executeQuery();
                  boolean questionRecordset_isEmpty = !questionRecordset.next();
                  boolean questionRecordset_hasData = !questionRecordset_isEmpty;
                  Object questionRecordset_data;
                  int questionRecordset_numRows = 0;
                     %> <%= questionRecordset.getObject("Question_Wording") %></td>
                </tr>
                <tr>
                  <td></td>
                  <td>
                     </td>
                </tr>
                <tr>
                  <td></td>
                  <td> 
                    <table>
                      <% while ((outcomeRecordset_hasData)&&(Repeat2__numRows-- != 0)) {%>
                      <tr>
                        <td><%=(((outcomeRecordset_data = outcomeRecordset.getObject("Outcome_Number"))==null || outcomeRecordset.wasNull())?"":outcomeRecordsetRecordset_data)%></td>
                        <td><%=(((outcomeRecordset_data = outcomeRecordset.getObject("Outcome_Text"))==null || outcomeRecordset.wasNull())?"":outcomeRecordsetRecordset_data)%></td>
                        <td><%=(((outcomeRecordset_data = outcomeRecordset.getObject("Score"))==null || outcomeRecordset.wasNull())?"":outcomeRecordsetRecordset_data)%></td>
                        <td><%=(((outcomeRecordset_data = outcomeRecordset.getObject("Feedback"))==null || outcomeRecordset.wasNull())?"":outcomeRecordsetRecordset_data)%></td>
                        <td><%=(((outcomeRecordset_data = outcomeRecordset.getObject("Question_ID"))==null || outcomeRecordset.wasNull())?"":outcomeRecordsetRecordset_data)%></td>
                      </tr>
                      <%
      Repeat2__index++;
      outcomeRecordset_hasData = outcomeRecordset.next();
    %>
                    </table>
                    <table>
                      <tr> </tr>
                      <tr> </tr>
                    </table></td>
                </tr>
                <%
      Repeat1__index++;
      itemRecordset_hasData = itemRecordset.next();
      count++;
    //questionRecordset.close();
    //StatementquestionRecordset.close();
    //ConnquestionRecordset.close();
    %>
    Here is the exception i am gettingorg.apache.jasper.JasperException: Unable to compile class for JSP
    An error occurred at line: 115 in the jsp file: /delivery/session.jsp
    Generated servlet error:
    C:\Servers\Tomcat 5.0\work\Catalina\localhost\assessment\org\apache\jsp\delivery\session_jsp.java:220: cannot find symbol
    symbol : variable outcomeRecordsetRecordset_data
    location: class org.apache.jsp.delivery.session_jsp
    out.print((((outcomeRecordset_data = outcomeRecordset.getObject("Outcome_Number"))==null || outcomeRecordset.wasNull())?"":outcomeRecordsetRecordset_data));
    ^
    An error occurred at line: 116 in the jsp file: /delivery/session.jsp
    Generated servlet error:
    C:\Servers\Tomcat 5.0\work\Catalina\localhost\assessment\org\apache\jsp\delivery\session_jsp.java:223: cannot find symbol
    symbol : variable outcomeRecordsetRecordset_data
    location: class org.apache.jsp.delivery.session_jsp
    out.print((((outcomeRecordset_data = outcomeRecordset.getObject("Outcome_Text"))==null || outcomeRecordset.wasNull())?"":outcomeRecordsetRecordset_data));
    ^
    An error occurred at line: 117 in the jsp file: /delivery/session.jsp
    Generated servlet error:
    C:\Servers\Tomcat 5.0\work\Catalina\localhost\assessment\org\apache\jsp\delivery\session_jsp.java:226: cannot find symbol
    symbol : variable outcomeRecordsetRecordset_data
    location: class org.apache.jsp.delivery.session_jsp
    out.print((((outcomeRecordset_data = outcomeRecordset.getObject("Score"))==null || outcomeRecordset.wasNull())?"":outcomeRecordsetRecordset_data));
    ^
    An error occurred at line: 118 in the jsp file: /delivery/session.jsp
    Generated servlet error:
    C:\Servers\Tomcat 5.0\work\Catalina\localhost\assessment\org\apache\jsp\delivery\session_jsp.java:229: cannot find symbol
    symbol : variable outcomeRecordsetRecordset_data
    location: class org.apache.jsp.delivery.session_jsp
    out.print((((outcomeRecordset_data = outcomeRecordset.getObject("Feedback"))==null || outcomeRecordset.wasNull())?"":outcomeRecordsetRecordset_data));
    ^
    An error occurred at line: 119 in the jsp file: /delivery/session.jsp
    Generated servlet error:
    C:\Servers\Tomcat 5.0\work\Catalina\localhost\assessment\org\apache\jsp\delivery\session_jsp.java:232: cannot find symbol
    symbol : variable outcomeRecordsetRecordset_data
    location: class org.apache.jsp.delivery.session_jsp
    out.print((((outcomeRecordset_data = outcomeRecordset.getObject("Question_ID"))==null || outcomeRecordset.wasNull())?"":outcomeRecordsetRecordset_data));
    ^
    An error occurred at line: 119 in the jsp file: /delivery/session.jsp
    Generated servlet error:
    Note: C:\Servers\Tomcat 5.0\work\Catalina\localhost\assessment\org\apache\jsp\delivery\session_jsp.java uses or overrides a deprecated API.
    An error occurred at line: 119 in the jsp file: /delivery/session.jsp
    Generated servlet error:
    Note: Recompile with -Xlint:deprecation for details.
    An error occurred at line: 119 in the jsp file: /delivery/session.jsp
    Generated servlet error:
    Note: C:\Servers\Tomcat 5.0\work\Catalina\localhost\assessment\org\apache\jsp\delivery\session_jsp.java uses unchecked or unsafe operations.
    An error occurred at line: 119 in the jsp file: /delivery/session.jsp
    Generated servlet error:
    Note: Recompile with -Xlint:unchecked for details.
    5 errors
         org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)     org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:332)
    org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:412)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:472)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
         org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)     org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

    Hi,
    Dont have much time to go through your code, but apparently i can see the error is becoz of the following reason.
    In the following code, you have used "outcomeRecordset_data ", but its not declared. You need to declare the variable first before you can use it.
    <% while ((outcomeRecordset_hasData)&&(Repeat2__numRows-- != 0)) {%>
                      <tr>
                        <td><%=(((outcomeRecordset_data = outcomeRecordset.getObject("Outcome_Number"))==null || outcomeRecordset.wasNull())?"":outcomeRecordsetRecordset_data)%></td>
                        <td><%=(((outcomeRecordset_data = outcomeRecordset.getObject("Outcome_Text"))==null || outcomeRecordset.wasNull())?"":outcomeRecordsetRecordset_data)%></td>
                        <td><%=(((outcomeRecordset_data = outcomeRecordset.getObject("Score"))==null || outcomeRecordset.wasNull())?"":outcomeRecordsetRecordset_data)%></td>
                        <td><%=(((outcomeRecordset_data = outcomeRecordset.getObject("Feedback"))==null || outcomeRecordset.wasNull())?"":outcomeRecordsetRecordset_data)%></td>
                        <td><%=(((outcomeRecordset_data = outcomeRecordset.getObject("Question_ID"))==null || outcomeRecordset.wasNull())?"":outcomeRecordsetRecordset_data)%></td>
                      </tr>
                      <%
      Repeat2__index++;
      outcomeRecordset_hasData = outcomeRecordset.next();
    %>Try declaring the "outcomeRecordset_data " on top as an object
    Hope it helps

  • URGENT Need Help with Login - "Skype can't connect"

    Hello, I've been trying to log into Skype for the past 2 hours and it just keeps coming up with an error message, "Skype can't connect". It does not provide any other information on how to fix the issue. I use Skype for work and it is not too helpfuly right now that it is not working. PLEASE HELP! Thank you so much!

    Kevazy wrote:
    Ruwim, could you please read my message I have sent you? Regards,KevazyTry to reset all Skype settings. Quit Skype or use Windows Task Manager to kill any Skype.exe process. Go to Windows Start and in the Search/Run box type %appdata% and then press Enter or click the OK button. The Windows File Explorer will pop up. There locate a folder named “Skype”. Rename this folder to something different, e.g. Skype_old. Next go to Windows Start and in the Search/Run box type %temp%\skype and then press Enter or click the OK button. Delete the DbTemp folder. Restart Skype. N.B. If needed, you will still be able to re-establish your call and chat history. All data is still saved in the Skype_old folder.

  • Urgent: Need Help with Substring/Instring

    I am taking a user input P_User_Name.
    P_User_Name is firstname/middlename/lastname
    Some examples:
    'James/Earl/Jones'
    '//Madonna'
    'Alec//Baldwin'
    Can someone tell me the code in PL/SQL to extract first name, middlename, lastname for a given P_User_Name.
    I would really appreciate your help.
    Thanks
    Home722

    Duplicate/triplicate posting... pathetic!!
    Urgent: SQL Gurus: Please Help
    Substring

  • Urgently need help with webservices

    I really really need to get a simple webservice working But all I'm getting is errors I have a second post describing my problems I'd be forever gratefully if someone would help!
    cumminsD

    Can any body see why this won't work ???
    ME ~]$ setenv CLASSPATH $AXIS_HOME
    [ME ~]$ setenv CLASSPATH "$CLASSPATH":$AXIS_LIB/axis.jar
    [ME ~]$ setenv CLASSPATH "$CLASSPATH":$AXIS_LIB/commons-logging.jar
    [ME ~]$ setenv CLASSPATH "$CLASSPATH":$AXIS_LIB/jaxrpc.jar
    [ME ~]$ setenv CLASSPATH "$CLASSPATH":$AXIS_LIB/log4j-1.2.4.jar
    [ME ~]$ setenv CLASSPATH "$CLASSPATH":$AXIS_LIB/commons-discovery.jar
    [ME ~]$ setenv CLASSPATH "$CLASSPATH":$AXIS_LIB/wsdl4j.jar
    [ME ~]$ setenv CLASSPATH "$CLASSPATH":$AXIS_LIB/xerces.jar
    [ME ~]$ setenv CLASSPATH "$CLASSPATH":$AXIS_LIB/saaj.jar
    [ME ~]$ setenv CLASSPATH "$CLASSPATH":$AXIS_LIB/axis-ant.jar
    [ME ~]$ setenv CLASSPATH "$CLASSPATH":$WEBSERVICES_HOME/junit3.8.1/junit.jar
    [ME ~]$ echo $CLASSPATH
    foo/axis-1_1RC2:foo/axis-1_1RC2/lib/axis.jar:foo/axis-1_1RC2/lib/commons-logging.jar:foo/axis-1_1RC2/lib/jaxrpc.jar:foo/axis-1_1RC2/lib/log4j-1.2.4.jar:foo/axis-1_1RC2/lib/commons-discovery.jar:foo/axis-1_1RC2/lib/wsdl4j.jar:foo/axis-1_1RC2/lib/xerces.jar:foo/axis-1_1RC2/lib/saaj.jar:foo/axis-1_1RC2/lib/axis-ant.jar:foo/junit3.8.1/junit.jar
    [ME ~]$
    [ME ~]$ cd $AXIS_HOME
    [ME axis-1_1RC2]$ java samples.userguide.example2.CalcClient -p8080 add 2 5
    Exception in thread "main" java.lang.NoClassDefFoundError: samples/userguide/example2/CalcClient
    [ME axis-1_1RC2]$
    [ME axis-1_1RC2]$ ls -l
    total 28
    drwxr-xr-x 5 ME ME 4096 mar 5 21:07 docs
    drwxr-xr-x 5 ME ME 4096 mai 27 14:52 lib
    -rw-r--r-- 1 ME ME 502 mar 5 21:07 README
    -rw-r--r-- 1 ME ME 3095 mar 5 21:07 release-notes.html
    drwxr-xr-x 19 ME ME 4096 avr 29 15:46 samples
    drwxr-xr-x 3 ME ME 4096 mar 5 21:07 webapps
    drwxr-xr-x 2 ME ME 4096 mar 5 21:07 xmls
    [ME axis-1_1RC2]$ cd ..
    [ME ~/foo]$ cd ..
    [ME ~]$ cd $WEBSERVICES
    WEBSERVICES: Undefined variable.
    [ME ~]$ cd $WEBSERVICES_HOME
    [ME ~/foo]$ ls -l
    total 142236
    drwxr-xr-x 7 cummins cummins 4096 mar 5 21:07 axis-1_1RC2
    -rw-rw-r-- 1 cummins cummins 34652160 avr 25 18:35 axis-1_1rc2.tar
    -rwxrwxr-x 1 cummins cummins 26532079 avr 24 16:06 j2sdk-1_3_1_07-linux-i586.bin
    drwxr-xrwx 12 cummins cummins 4096 avr 24 15:00 jakarta-tomcat-4.0.6
    -rw-rw-r-- 1 cummins cummins 20736000 avr 24 11:48 jakarta-tomcat-4.0.6.tar
    drwxr-xr-x 9 cummins cummins 4096 d�c 6 20:53 jdk1.3.1_07
    drwxrwxr-x 5 cummins cummins 4096 sep 4 2002 junit3.8.1
    -rw-rw-r-- 1 cummins cummins 441665 mai 9 12:34 junit3.8.1.zip
    -rw-rw-r-- 1 cummins cummins 35824515 avr 29 12:34 jwsdp-1_1-unix.sh
    drwxr-xr-x 13 cummins cummins 4096 avr 28 04:01 mod_perl-1.99_09
    -rw-rw-r-- 1 cummins cummins 3092480 mai 2 17:52 mod_perl-2.0-current.tar
    drwxr-xr-x 3 cummins cummins 4096 mai 9 16:59 myjavafiles
    drwxr-xr-x 5 cummins cummins 4096 mai 9 11:55 xerces-1_4_4
    -rw-rw-r-- 1 cummins cummins 24156160 mai 9 10:44 Xerces-J-bin.1.4.4.tar
    [cummins@pclx11 ~/foo]$ cd $AXIS_LIB
    foo/axis-1_1RC2/lib: No such file or directory.
    [cummins@pclx11 ~/foo]$ cd ..
    [cummins@pclx11 ~]$ cd $AXIS_LIB
    [cummins@pclx11 lib]$ ls -l
    total 4224
    -rw-r--r-- 1 cummins cummins 384889 mar 5 21:07 axis-ant.jar
    -rw-r--r-- 1 cummins cummins 1224774 mar 5 21:07 axis.jar
    -rw-r--r-- 1 cummins cummins 67334 mar 5 21:07 commons-discovery.jar
    -rw-r--r-- 1 cummins cummins 26388 mar 5 21:07 commons-logging.jar
    drwxrwxr-x 2 cummins cummins 4096 mai 27 14:51 data
    drwxrwxr-x 3 cummins cummins 4096 mai 27 14:51 docs
    -rw-r--r-- 1 cummins cummins 35658 mar 5 21:07 jaxrpc.jar
    -rw-r--r-- 1 cummins cummins 2693 nov 15 2001 LICENSE
    -rw-r--r-- 1 cummins cummins 378778 mar 5 21:07 log4j-1.2.4.jar
    -rw-r--r-- 1 cummins cummins 478 nov 15 2001 Readme.html
    -rw-r--r-- 1 cummins cummins 18402 mar 5 21:07 saaj.jar
    drwxrwxr-x 6 cummins cummins 4096 mai 27 14:52 samples
    -rw-r--r-- 1 cummins cummins 113178 mar 5 21:07 wsdl4j.jar
    -rw-r--r-- 1 cummins cummins 1812019 nov 15 2001 xerces.jar
    -rw-r--r-- 1 cummins cummins 193032 nov 15 2001 xercesSamples.jar
    [ME lib]$
    [ME ~]$ cd $AXIS_HOME
    [ME axis-1_1RC2]$ cd samples/userguide/example2
    [me example2]$ ls -l
    total 20
    -rw-rw-r-- 1 cummins cummins 1534 mai 22 16:50 CalcC.java
    -rw-r--r-- 1 cummins cummins 2484 mar 5 21:07 CalcClient.class
    -rw-r--r-- 1 cummins cummins 4202 mar 5 21:07 CalcClient.java
    -rw-r--r-- 1 cummins cummins 2797 mar 5 21:07 Calculator.java

  • URGENT *** Need help with SPEL

    Does anyone have sample code of assigning SPEL attributes in both Process Request and Process Forms Request.

    SPEL is adaption of EL in jsp/servelets in OA Framework. Its basically expression langauge so, you can't update it in process or process form request directly. SPEL in OAF is used attcah any UIX bean property like render,read only etc to a attribute in a View object. Hence if you need to update SPEL, update the VO attribute programatically in process or process form request.
    --Mukul                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Need help with scroll effects for horizontally + vertically scrolling website

    Hi,
    I recently came across a website that uses both horizontal and vertical scrolling where 1 scroll = full browser length move to the next section (as opposed to several rotations in a continuous motion of the mouse ball like the majority of websites). Please see the example here because I'm probably not explaining this very well : A Chocolate Bar, Restaurant and Shop for Chocolates, Fondue, Gift Boxes, and More | Max Brenner (http://maxbrenner.com).
    I'm wondering if this effect is something that can be done in Muse and if so, how to do it. It's something I'm seeing more and more and almost behaves like a slideshow that can be controlled by scrolling.
    Thank you!
    Michele

    Hi Michele,
    I am afraid that this is not possible out of the box at this stage, I will recommend that you post this on the ideas section over here, Ideas for features in Adobe Muse
    You can, in the mean time, use some CSS to disable the scroll bar, preventing the partial scrolling of the page and disabling the mouse wheel scrolling as well, leaving behind only your navigation to scroll through the page.
    - Abhishek Maurya

  • I need help with scrolling and keyboard buttons on windows 7

    I've been able to install sound, bluetooth, and I'm able to do a right click.
    But for some reason, I still *can't scroll* and *the buttons on the keyboard (i.e. the eject button*), still won't work.
    There are two trackpad drivers on the snow leopard dvd. One is called multitouch and one just called *track pad*. Which one of those should I install?

    Hi nayefo,
    Try installing multitouch, and then see, while in windows, if you've successfully installed multitouch and multitouch mouse, you should have those drivers. Also check if you've installed trackpad and trackpad enabler.
    Cheers,
    Erik

  • Re: GT72 2QD Urgently need helps with freezing

    Same here, have the same problem with my new GT72 currently on windows 8.1.
    The freezes happen randomly and the system reboots eventually after some time.
    Happened for me on:
    * Ubuntu 14.04.5 LTS
    * Ubuntu 14.04.5 LTS (vanilla 4.13 kernel)
    * Windows 8.1...

    Have you tried updating the BIOS?
    http://www.msi.com/support/nb/GS70-2QE-Stealth-Pro-4.html#down-bios
    And also the EC?
    http://www.msi.com/support/nb/GS70-2QE-Stealth-Pro-4.html#down-firmware
    Have you also installed all drivers for your system?
    http://w...

Maybe you are looking for

  • IPhoto sort order changes on iPad/iPhone when photos are edited

    I have been having issues getting photos to display in the correct order on my iPad, iPhone and Apple TV. When I go into an event I want the first photo taken to be at the top and the last at the bottom. I sort by date so that photos taken on differe

  • View iphone on pc????

    Is there any way you can view your iphone screen on a PC? Any help would be appreciated

  • Elements 13 crashes before it starts! APPCRASH

    Hey Community, yesterday I refresh my system and copied the favorite Programms. All of them running, also lightroom 5.7 64bit. But when I want to start elements 13, I get the error message: Problemsignatur:   Problemereignisname:    APPCRASH   Anwend

  • Why can't i send files with bluetooth?

         It doesn't work to send or look in my iphone 4s Anslut till nätverk = Connect to the network And i have pared it 3 times and it doesn't work and on my iphone it says "xxxx macbook pro" is not supported, and I have Mac OS X Lion Please help

  • Upgrade version

    <p>Hi </p><p> </p><p>I just up upgrade from Crystal Report Developer Edition 10 to Crystal Report XI. I used apache tomcat version 4.1.31 and the Microsoft SQL Server 2000 as for database. The crystalreportviewer is version 10.</p><p>I've created a r