Help with scrolling screen

I am writing a turn based strategy game in Java but I am unable to make a scrolling screen you can "move" your view of the game board around in.
I can do every other aspect of the game myself, except for this.
Examples of this on the internet are only for Applets(My program is a JFrame)
Can anyone help?

http://java.sun.com/javase/6/docs/api/javax/swing/JViewport.html
Edit: Don't even start with the Swing fascist thing George ;-D
Further edit: Here, i'll keep it neutral. http://help.eclipse.org/help31/index.jsp?topic=/org.eclipse.draw2d.doc.isv/reference/api/org/eclipse/draw2d/Viewport.html
Message was edited by:
jGardner

Similar Messages

  • 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.

  • Mac user needs help with photoshop screen and tool bar

    Hello when I open photoshop I get the screen you can see to the left. The right hand tool bar has disapeard, if you scroll across it comes into view, I want to be able to open photoshop as I could originally with the screen the size of the computer screen and the tool bar in place. What is also happening is that when I select the image i want, the image goes directly on to the screen and does not go to the tool bar above, again I would like to have the images going to the tool bar so I can select them and put them on a blank page. The same happens when I open up a blank page it does not store it in the tool bar but opens it up directly on to sreen. Hope you can help.

    Thanks also tried that it does hangs the screen back to how it was but the background is now my screen saver with the photoshop tool bars around. But the docking area is still not visible and when I open a file it opens it as sep screen and layer and not as part of docking station? Very strange
    Sent from my BEphone

  • 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.

  • Help With Scrolling Menu / Button Rollovers

    First thank you to anyone who can answer and help with this
    question.
    http://paragon.sortismarketing.com
    - at this link I have created a site with a simple scrolling menu.
    Now what I want to happen is when you rollOver the buttons on the
    scrolling menu they get larger and then smaller again after you
    roll off them.
    I know how to do this with tweening in a non moving
    environment, by making them a movie clip instead of button. But for
    some reason when I did this in this case it screwed the menu all up
    and made it go crazy. Is there a way to do this with action script
    that isn't going to screw up the underlying code for the
    scrolling?

    You can use the below code also. As your mouse pointer goes
    over the down, it will scroll down.
    on(rollOver){
    scrolltext.scroll -= 1;

  • Help with Scrolling Text Item.

    Hi , need help with making a text item scrollable.
    i.e. A field is 30 characters and i can only display 10
    characters, now what I would like is a scroll bar under the text
    item.
    Is this possible. I am using Forms 5.
    Thanx for any help.
    Pankaj Patel.
    null

    Petr Valouch (guest) wrote:
    : Pankaj Patel (guest) wrote:
    : : Hi , need help with making a text item scrollable.
    : : i.e. A field is 30 characters and i can only display 10
    : : characters, now what I would like is a scroll bar under the
    : text
    : : item.
    : : Is this possible. I am using Forms 5.
    : : Thanx for any help.
    : : Pankaj Patel.
    : Hi
    : You need that scrollbar under the item? You can set length
    of
    : text item and its size independently, so you can have text
    item
    : char(30) with size of 10 characters.
    An alternative is to declare the item as a multi-line text item
    with wrap set on. This would give you a vertical scroll bar on
    the item.
    Another option is to programmaticaly pop up an Editor, each time
    focus is moved to the item, or to actually change the width of
    the item when focus moves to it (and shrink it back when focus
    moves away.
    Simon Hedges
    Gloucester
    UK
    null

  • Need help with full screen slideshow image quality

    I am looking to display some images with full screen slideshow. The images I add are very large, over 5000 wide. When I publish the site some images retain their quality while others lose it and look like crap. Why would this be and how can I fix it. I tried to resize them to the 2560x1707 that muse does, and then add them. This doesn't change the end result of poor quality.

    Go to Assets Panel and locate the image you want to use at original size. Right click the image and chose 'Import Larger Size'.
    See if that helps retain quality for that image, since Muse does not resize/interpolate that image for you.
    Cheers,
    Vikas

  • Help with scrolling thumbnails photogallery

    i need some help with this photo gallery im working on. im pretty sure i have almost everything correct but for some reason i cant get the thumbnails when clicked to link up with the img. i want it to show.
    well i cant really upload the file here i just found out so i can email it to whoever leaves there email
    if someone could take a look at the file and tell me what im doing wrong that would be so helpful ive been working on it for the past 2 days trying to fig. out whats wrong searching everywhere and i just cant fig. it out.
    thanks for the help

    Please don't duplicate postings.

  • Help with T430 screen resolution

    I would like to purchase a T430 with 1600x900 screen resolution as recommended in the reviews. However, I am concerned about whether I will be able to read text at that resolution. (This was an issue with the higher resolution when I purchased my beloved T400.) I cannot find a T430 in my area to look at before purchase. So, I am wondering whether some kind soul might be willing to post a screenshot of the desktop (with icons on it) of their T430 1600x900. Viewed at the original size, I should be able to determine from that image whether it will be legible, right?
    Solved!
    Go to Solution.

    Lilac wrote:
    There are no stores in my area that carry the T430. I would have to travel 3 hours to see one. But if the screenshot would not tell me what I need to know, maybe I will need to do just that.
    I didn't say a ThinkPad.  Any computer with a 14" screen running 1600x900 natively will give you some idea if that resolution is going to be acceptable.
    If the closest computer store is 3 hours, it probably isn't worth doing.  6 hours round trip is a lot of time and hassle.

  • Help with scrolling background

    i am following a tutorial and in it, when the Hero hits a
    wall he respawns somewhere on the screen. The problem with that
    was, that i didnt know where he would respawn. And In order to make
    the maze bigger i used a scrolling background and I couldnt figure
    out how to change the respawn location either. Here is the site
    that I am following the tutorial from
    http://www.emanueleferonato.com/2007/02/09/flash-game-creation-tutorial-part-51/
    Below is the code that I'm using
    onClipEvent (load) {
    yspeed = 0;
    xspeed = 0;
    wind = 0.00;
    power = 0.65;
    gravity = 0.1;
    upconstant = 0.75;
    friction = 0.99;
    onClipEvent (enterFrame) {
    if (Key.isDown(Key.LEFT)) {
    xspeed = xspeed-power;
    if (Key.isDown(Key.RIGHT)) {
    xspeed = xspeed+power;
    if (Key.isDown(Key.UP)) {
    yspeed = yspeed-power*upconstant;
    if (Key.isDown(Key.DOWN)) {
    yspeed = yspeed+power*upconstant;
    xspeed = (xspeed+wind)*friction;
    yspeed = yspeed+gravity;
    _root.wall._y -=yspeed;
    _root.wall._x -=xspeed;
    _rotation = _rotation+xspeed;
    if (_root.wall.hitTest(_x, _y, true)) {
    xspeed = 0;
    yspeed = 0;
    _root.wall._x = 2500;
    _root.wall._y = 1681;
    Can anyone help me?

    there's no width property in a2.  use _width:
    animator = createEmptyMovieClip('animator',1);
    bg_1 = animator.attachMovie('bg_mc','bg_1',1);
    bg_2 = animator.attachMovie('bg_mc','bg_2',2);
    bg_1._x = -bg_1._width/2;
    bg_2._x = bg_2._width/2;
    speed = 1;
    cloudWidth = 380;
    animator.onEnterFrame = function () {
        bg_1._x -= speed;
        bg_2._x -= speed;
        if (bg_1._x <= -bg_1._width) bg_1._x = cloudWidth;
        if (bg_2._x <= -bg_2._width) bg_2._x = cloudWidth;

  • Help with scroll volume bar on pavilion dv6-1330sa

    I've had a few problems for a while now on this computer but my touch screen volume slide bar stopped working a few months ago. can someone please explain how to get it fixed i will need an exact description as i am in no way a proffesional on a laptop, basiccally
    .at the rear of the keyboard the touch sound scroll bar has stopped working
    .the mute and wi-fi touchbuttons also dont work
    .will only download things from hp site, dont refer to anything dodgy.
    .il be very happy if someone can fix this
    thnkyou very much

    Sounds like an issue with the keyboard bezel, it is most likely a loose ribbon cable from the circuit board on the keyboard bezel to the ZIF connector on the motherboard.  A HP Authorized Service Center can take a look at this if your laptop is under warranty.  The warranty status can be checked here:
    http://www13.itrc.hp.com/service/ewarranty/warrant​yResults.do?admit=109447627+1286541891570+28353475
    If it is not under warranty, consider looking up the maintenance manual for your model laptop.  The manual will have schematics on how to disassemble the laptop, a keyboard bezel is a little tricky but not too hard to remove.  You'll need a spudger, an Torx-8 screwdriver and a Phillips-1 screwdriver.  Remove the ribbon cable that connects the bezel to the motherboard and re-seat it, ensuring that the ribbon cable lays flush with the bottom of the ZIF connector, push down on the ZIF to seal the connection and re-assemble the keyboard bezel and keyboard, putting all the screws back in.
    ________________________________________________________________________________________________________ I Love Kudos! If you feel my post has helped you please click the White Kudos! Star just below my name
    If you feel my answer has fixed your problem please click 'Mark As Solution' and make it easier for others to find help quickly

  • I need help with blue screen on Windows 7

    Hi guys...I was wondering if someone could help me...!
    While I play a video game, I recieve a error blues screen message...I don't know if it is an error from my S.O, or it is an error for that video game...! 
    The message that I been given so far says :
    Problem signature:
      Problem
    Event Name:                        BlueScreen
      OS Version:                                         6.1.7600.2.0.0.256.1
      Locale ID:                                             10250
      Additional
    information about the problem:
      BCCode: 
                                                 50
      BCP1:                                                    FFFFF900C061C770
      BCP2:                                                    0000000000000000
      BCP3:                                                    FFFFF96000636D15
      BCP4:                                                    0000000000000000
      OS
    Version:                                          6_1_7600
      Service
    Pack:                                       0_0
     Product:                      
                            256_1
      Files
    that help describe the problem:
      C:\Windows\Minidump\022710-26223-01.dmp
      C:\Users\Caroline\AppData\Local\Temp\WER-125393-0.sysdata.xml

    Hi,
    In order to assist you, we will need the .DMP files to analyze what exactly occurred at the time of the crash, etc.
    If you don't know where .DMP files are located, here's how to get to them:
    1. Navigate to the %systemroot%\Minidump folder.
    2. Copy any and all DMP files in the Minidump folder to your Desktop and then zip up these files.
    3. Upload the zip containing the .DMP files to Onedrive or a hosting site of your choice and paste in your reply. Preferred sites: Onedrive, Mediafire, Dropbox, etc. Nothing with wait-timers, download managers, etc.
    4 (optional): The type of .DMP files located in the Minidump folder are known as Small Memory Dumps. In %systemroot% there will be what is known as a Kernel-Dump (if your system is set to generate). It is labeled MEMORY.DMP. The difference
    between Small Memory Dumps and Kernel-Dumps in the simplest definition is a Kernel-Dump contains
    much more information at the time of the crash, therefore allowing further debugging of your issue. If your upload speed permits it, and you aren't going against any strict bandwidth and/or usage caps, etc, the Kernel-Dump is the best
    choice. Do note that Kernel-Dumps are much larger in size due to containing much more info, which is why I mentioned upload speed, etc.
    If you are going to use Onedrive but don't know how to upload to it, please visit the following:
    Upload photos and files to Onedrive.
    After doing that, to learn how to share the link to the file if you are unaware, please visit the following link -
    Share files and folders and change permissions and view 'Get a link'.
    Please note that any "cleaner" programs such as TuneUpUtilities, CCleaner, etc, by default will delete .DMP files upon use. With this said, if you've run such software, you will need to allow the system to crash once again to generate a crash dump.
    If your computer is not generating .DMP files, please do the following:
    1. Start > type %systemroot% which should show the Windows folder, click on it. Once inside that folder, ensure there is a Minidump folder created. If not, CTRL-SHIFT-N to make a New Folder and name it Minidump.
    2. Windows key + Pause key. This should bring up System. Click Advanced System Settings on the left > Advanced > Performance > Settings > Advanced > Ensure there's a check-mark for 'Automatically manage paging file size for all
    drives'.
    3. Windows key + Pause key. This should bring up System. Click Advanced System Settings on the left > Advanced > Startup and Recovery > Settings > System Failure > ensure there is a check mark next to 'Write an event to the system
    log'.
    Ensure Small Memory Dump is selected and ensure the path is %systemroot%\Minidump.
    4. Double check that the WERS is ENABLED:
    Start > Search > type services.msc > Under the name tab, find Windows Error Reporting Service > If the status of the service is not Started then right click it and select Start. Also ensure that under Startup Type it is set to Automatic rather than
    Manual. You can do this by right clicking it, selecting properties, and under General selecting startup type to 'Automatic', and then click Apply.
    If you cannot get into normal mode to do any of this, please do this via Safe Mode.
    Regards,
    Patrick
    “Be kind whenever possible. It is always possible.” - Dalai Lama

  • 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

  • Help with scrolling photo gallery

    I'm using the code below to for a scrolling photo gallery. I got this from another forum on Adobe. My problem is that I can't get my images to upload. I uploaded this for an image but it's not working:
    <img src="images/baca_poster_small.jpg" data-cycle-title="image1">
    Can someone please help me with getting my pictures to work in this?
    Thanks!
    <!doctype html>
    <html>
    <head>
    <meta charset="utf-8">
    <title>HTML5 document with Cycle2</title>
    <!--Latest jQuery Core Library-->
    <script src="http://code.jquery.com/jquery-latest.min.js">
    </script>
    <!--Cycle2 Plugin Script-->
    <script src="http://cdnjs.cloudflare.com/ajax/libs/jquery.cycle2/20130409/jquery.cycle2.min.js"></script>
    <style>
    .cycle-slideshow, .cycle-slideshow * {
    -webkit-box-sizing:border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    margin:0 auto;
    width:45%; /**adjust width as required**/
    .cycle-slideshow img {width: 100%;}
    </style>
    </head>
    <body>
    <h1><a href="http://www.malsup.com/jquery/cycle2/">jQuery Cycle 2</a> Responsive Slideshow</h1>
    <!--begin slideshow-->
    <div class="cycle-slideshow"
        data-cycle-pause-on-hover="true"
        data-cycle-speed="700"
    >
    <!--your images go here-->
    <img src="http://malsup.github.com/images/beach1.jpg" data-cycle-title="beach1">
    <img src="http://malsup.github.com/images/beach2.jpg" data-cycle-title="beach2">
    <img src="http://malsup.github.com/images/beach3.jpg" data-cycle-title="beach3">
    <img src="http://malsup.github.com/images/beach4.jpg" data-cycle-title="beach4">
    <img src="http://malsup.github.com/images/beach9.jpg" data-cycle-title="beach9">
    <!--end slideshow-->
    </div>
    </body>
    </html>

    Is this supposed to be a WordPress site?  None of these images are found on the server.  Those folders don't exist either.
    <img class="first" src="mosspictures/DSCN0038.JPG" alt="">
       <img src="mosspictures/DSCN0040.JPG" alt="">
       <img src="wordpress/wp-content/themes/MarcMossTheme/image-3.jpg" alt="">
       <img src="wordpress/wp-content/themes/MarcMossTheme/image-4.jpg" alt="">
       <img src="wordpress/wp-content/themes/MarcMossTheme/image-5.jpg" alt="">
       <img src="wordpress/wp-content/themes/MarcMossTheme/image-6.jpg" alt="">
       <img src="wordpress/wp-content/themes/MarcMossTheme/image-1.jpg" alt="">
       <img src="wordpress/wp-content/themes/MarcMossTheme/image-2.jpg" alt="">
       <img src="wordpress/wp-content/themes/MarcMossTheme/image-3.jpg" alt="">
       <img src="wordpress/wp-content/themes/MarcMossTheme/image-4.jpg" alt="">
    Nancy O.

  • HELP WITH SCROLLING DELAY ANYONE?

    I did a software upgrade with the latest security update on 9/24 and since that update I have weird scrolling issues and clicking issues. When I click on a button, it usually doesn't recognize the click on the first click unless I click super hard. Usually the second click it will activate. Also when I have a scrollable window and I click on the scroll bar to pull it down, I can scroll to the bottom of the scroll bar but the window takes 10-20 seconds to scroll down, why such a delay, it never did that before this udpate. It does usually scroll the window if you wait long enough, but sometimes just stops all together. Also, when I select a line...e.g. like if I go into my Mail mailbox and click on an email to view it, then go back and click on the next email, if I click like normal it never moves to that email until I click 1-3 extra times. If I go to the next email and click super hard it takes, but I shouldn't have to click that hard. Also when I try to move my cursor when typing, usually it doesn't move on the first click, but takes 2-3 clicks to finally move to the correct place. Anyone else with these issues or aware of what needs to be done? Thanks. Gary

    Praise the Lord! I also have EXACTLY the same problem!
    I first noticed this with Google search results, as often I position my mouse over the 'Next Page' button, the scroll through and click without moving the pointer.
    Indeed the first 'tap' click is not recognised, but tap again the the mouse clicks.
    THE PROBLEM:
    There is a delay after the trackpad recognises the two finger scrolling before the trackpad will recognise another input. It's expecting you to scroll and scroll, so it's waiting for that. It's similar to the way the trackpad allows you to lift your finger when moving a window around the screen.
    THE SOLUTION:
    No there isn't one. Naturally Apple could just allow us to tweak that option so we make the delay shorter, but they won't. Just like how they don't think the eject key on a MBA could be used to eject a SD card.

Maybe you are looking for

  • Security Alertwhen clicking on link in a pdf

    Hi, I'm sure this has been discussed very often, but I really couldn't find a solution through the search. Could you help me with this: How can I permanently disable these constant security alerts when clicking on links in my pdfs? Thanks so much, Ed

  • New Task Bar Control for Yahoo! Music Engi

    Thought those of you who use Yahoo! Music Engine would like to check out a free task bar control for the player. I found this buried in the Yahoo Forums from early July. I was trying to find a remote that wouldn't shut down everytime I clicked my mou

  • List of datafiles in VIS

    Hi!, I am trying a multinode VIS install 32bit mid-tier and 64-bit db tier. Need list of datafiles to recreate controlfile (installed on 32 bit first but it failed after unzipping). Thanks in advance.

  • Downconvert from labview 8.0 to labview 7.1

    Hello everybody, I have LabView 2011 and 7.1 installed but unfortunately I miss any intermediate version.. So I downconverted from 2011 to 8.0 by myself but now I need your help to arrive to 7.1. Can anybody do it? Thanks a lot, Denise Solved! Go to

  • Exporting HD Slideshow from iphoto7.1.4?

    I can't seem to figure this out.  Every time I create a slide show, put all the transitions music etc to it, then go to file>export the largest it will let me export is 640x480?  Can you not export a larger QT file? I have looked in the forums here a