Viewport question

I have an Apple fixed layout template, I need to know the following:
when looking at a book done from this template I see a two page spread with some grey background in landscape on my IPad2
if I turn to portrait I still see the two page spread with of course the larger grey background top and bottom.
Is there a way to have the book view as a one page spread in portrait where it fills up the entire screen?
viewport is set to 560 x 720
here is the display options.xml file
<?xml version="1.0" encoding="UTF-8"?>
<display_options>
    <platform name="*">
        <option name="fixed-layout">true</option>
    </platform>
    <platform name="iphone">
        <option name="orientation-lock">portrait-only</option>
        </platform>
</display_options>
thx
R

Thanks for reply stas; thankfully taking a second look at the problem this morning I was able to find the answer...
Overriding the JTable paintComponent() method wouldn't work because it would provide the same result as what im currently seeing...
The solution was to force a repaint of the viewport when the column selection changes then everything works as planned...presumably what was happening before was that only the part of the viewport that the table covered was repainted

Similar Messages

  • JScrollPane viewport size question

    Hi all,
    I've a component that is very large (it has a dinamic height) but its width is always the same (fixed). I need to show this component in a JScrollPane container and only shows the vertical scrollbar. It works fine but when my applications runs, the component inside the JScrollPane (yes..my component) get a different width, which is larger than the original componet's width
    I'm using the following code:
            JScrollPane scroll = new JScrollPane(myComponent);
            scroll.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);My question is, How I can do for set a fixed width to the JScrollPane (its viewport or its child component) in order to get the correct component width and only allows a dinamic height ?
    thanks in advance

    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.util.Random;
    public class Test3 extends JFrame {
      JPanel jp = new JPanel();
      JScrollPane jsp = new JScrollPane(jp);
      JLabel jl = new JLabel("", JLabel.CENTER);
      Random rand = new Random();
      public Test3(){
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        Container content = getContentPane();
        content.add(jl, BorderLayout.NORTH);
        jp.setBorder(BorderFactory.createLineBorder(Color.blue));
        jsp.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
        jsp.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
        content.add(jsp, BorderLayout.CENTER);
        JButton jb = new JButton("Random Height");
        content.add(jb, BorderLayout.SOUTH);
        jb.addActionListener(new ActionListener() {
          public void actionPerformed(ActionEvent ae) {
            int height = rand.nextInt(1000);
            jp.setPreferredSize(new Dimension(jsp.getViewport().getWidth(),height));
            jsp.getViewport().revalidate();
            jl.setText(""+height);
        setSize(300,300);
      public static void main(String[] args) {new Test3().setVisible(true); }
    }

  • Header text not responsive at smart phone size & BG question

    The header text doesn't fit into the view for a smart phone. I don't know how to correct that other than to change my width from 85% to 100% when at the smallest size (if that can be done). Help?
         I thought it would be better to ask this next question on a new thread but both needed the code so I'll add that here:
    The purse (& butterfly) images have an incomplete BG color. The partial upper BG color comes from div hover which really isn't a functional div. Since the image boxes are within the body but not a separate div I don't know how to get BG color (same as footer). help?
    Code:
    <!DOCTYPE>
    <html>
    <head>
    <meta charset="UTF-8">
    <title>Lapinel Arts Leatherwork</title>
    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
    <link href='http://fonts.googleapis.com/css?family=Overlock:400,700|Simonetta:400,900|Marcellus|Junge' rel='stylesheet' type='text/css'>
    <style>
    box-sizing: border-box;
    body {
        margin: 0;
        padding: 0;
        background: #fff;
        font: 14px/20px 'Lucida Sans',sans-serif;
        background-color: #cfc6b0;
    .wrap {
    overflow: hidden;
    .box {
    float: left;
    position: relative;
    width: 25%;
    text-align: center;
    margin-bottom: 24px;
    .boxInner {
    position: relative;
    text-align: center;
    margin: 0 12px;
    overflow: hidden;
    img {
    max-width: 100%;
    .titleBox {
        position: absolute;
        bottom: 10px;
        left: 130px;
        right: 0px;
        margin-bottom: -50px;
        background: #000;
        background: rgba(0, 0, 0, 0.5);
        color: #FFF;
        padding: 10px;
        text-align: center;
        -webkit-transition: all 0.3s ease-out;
        -moz-transition: all 0.3s ease-out;
        -o-transition: all 0.3s ease-out;
        transition: all 0.3s ease-out;
    .titleBox h2 {
    font-size: 16px;
    margin: 0;
    padding: 0 0 5px 0;
    .titleBox a {
    text-decoration: none;
    color: #fff;
    .boxInner:hover .titleBox {
    margin-bottom: 0;
    @media only screen and (max-width : 768px) {
    .box {
    width: 50%;
    margin-bottom: 24px;
    @media only screen and (max-width : 480px) {
    .box {
    width: 100%;
    @media only screen and (max-width : 1290px) and (min-width : 1051px) {
       /* Medium desktop: 4 tiles */
       .box {
          width: 25%;
          padding-bottom: 25%;
    </style>
    <style>
    section, header, nav {
        display: block;
        background-color: #cfc6b0;
        box-sizing: border-box;
    body{
        font-family: 'Marcellus', normal;
        background-image: url(DRA-042010-LeatheryTexture-MBFT.jpg);
        font-size: 90%;
        line-height: 140%;
        color: #555;
        margin: 0 auto;
        padding: 0;
        background-color: #FFF;
        width: 1000px;
        max-width: 85%;
    #hover-image {
        background-color: #cfc6b0;
        text-align: center;
        height: 2000px
        overflow: hidden;
    img {
    max-width: 100%;
    height: auto;
    .container {
    width: 85%;
    max-width: 1000px;
    margin: 0 auto;
    color: #000;
    header h1 {
    font-size: 300%;
    line-height: 150%;
    text-align: center;
    letter-spacing: 4px;
    padding: 20px 0;
    color: #000;
    font-weight: bold;
    /* top level navigation */
    nav {
        background-color: #E5E4E2;
    nav ul {
    display: block;
    text-align: center;
    margin: 0;
    padding: 0;
    nav li {
    margin: 0;
    padding: 0;
    display: inline;
    position: relative;
    nav a {
        display: inline-block;
        text-decoration: none;
        padding: 10px 25px;
        color: #000;
    nav a:hover {
        background-color: #cfc6b0;
        color: #000;
    nav span {
    display: none;
    /* droplist navigation */
    nav ul ul {
    position: absolute;
    z-index: 1000;
    left: 0;
    top: 2em;
    background-color: #E5E4E2;
    text-align: left!important;
    display: none;
    nav ul ul li a {
    display: block;
    width: 12em;
    border-top: 1px dotted #ccc;
    .about {
    padding: 0 8%;
    margin: 0 auto;
    text-align: center;
    background-color: #E5E4E2;
    .about h2 {
        font-size: 260%;
        line-height: 200%;
        margin: 0;
        padding: 0;
        color: #000;
    .about p {
    font-size: 110%;
    line-height: 150%;
    margin: 0;
    padding: 0 0 20px 0;
    .productsWrapper {
    background-color: #000;
    overflow: hidden;
    padding: 30px 25px;
    .product {
    float: left;
    width: 25%;
    padding: 12px;
    text-align: center;
    color: #fff;
    .product img {
    border: 1px solid #fff;
    .view_details {
    text-decoration: none;
    display: inline-block;
    padding: 15px 20px;
    border-radius: 6px;
    border: 1px dotted #ccc;
    color: #555;
    background-color: #fff;
    .view_details:hover {
    background-color: #E5E4E2;
    #mobileTrigger {
    padding: 10px 25px;
    font-size: 120%;
    display: none;
    color: #000;
    footer {
    clear: both;
    background-color: #cfc6b0;
    padding: 30px;
    color: #fff;
    text-align: center;
    overflow: hidden;
    footer a {
    text-decoration: none;
    color: #000;
        float: left;
        width: 33.33%;
        color: #000;
        border: #000
    .footerBox {
        float: left;
        width: 33.33%;
        color: #000;
    @media screen and (max-width: 768px) {
        .container {
    width: 100%;
    .product {
    width: 50%;
    #mobileTrigger {
    display: block;
    text-align: right;
    nav ul {
    display: none;
    nav li {
    display: block;
    text-align: left;
    nav a {
    display: block;
    font-size: 120%;
    border-top: 1px dotted #ccc;
    nav span {
    display: inline-block;
    float: right;
    font-size: 130%;
    /* droplist navigation */
    nav ul ul {
    position: static;
    nav ul ul li a {
    width: 100%;
    @media screen and (max-width: 480px) {
    .product {
    float: none;
    width: 100%;
    body,td,th {
    font-family: Marcellus, normal;
    #copyright {
    color: #000;
    font-weight: bold;
    </style>
    <script type="text/javascript" src="http://lapinelarts.com/JS/jquery-1.11.2.min.js"></script>
    <script type="text/javascript" src="http://lapinelarts.com/JS/jquery.cycle2.min.js"></script>
    <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
    <script>
    $(document).ready(function() {
    //activate mobile navigation icon when window is 768px
    $('#mobileTrigger').css('cursor','pointer').click(function() {
    $('#mobileTrigger i').toggleClass('fa-bars fa-times');
    $('nav ul').toggle();
    // show main desktop navigation onresize/hide sub navigation
    $(window).on('resize', function(){
    var win = $(this); //this = window
    if (win.width() > 768) {
    $('nav ul').show();
    $('nav ul ul').hide();
    //listen for navigation li being clicked
    $('nav ul li').click(function() {
    $(this).find('ul').slideToggle();
    //toggle font awesome icons
    $(this).find('i').toggleClass('fa-bars fa-times');
    //events if window is less than 768px
    if ($(window).width() < 768) {
    //stops submenu sliding up when mouse leaves mobile
    $('nav ul ul').show();
    else {
    //activate desktop submenu on hover
    $('nav ul li').mouseenter(function() {
    $(this).find('ul').slideToggle();
    //toggle font awesome icons
    $(this).find('i').toggleClass('fa-bars fa-times');
    //desktop submenu slides up when mouse leaves ul/li
    $('nav ul ul').mouseleave(function() {
    $(this).slideUp();
    $('nav ul li').mouseleave(function() {
    $(this).find('ul').slideUp();
    function MM_swapImgRestore() { //v3.0
      var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
    function MM_preloadImages() { //v3.0
      var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
        var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
        if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
    function MM_findObj(n, d) { //v4.01
      var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
        d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
      if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
      for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
      if(!x && d.getElementById) x=d.getElementById(n); return x;
    function MM_swapImage() { //v3.0
      var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
       if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
    </script>
    <style type="text/css">
    </style>
    </head>
    <body onLoad="MM_preloadImages('810_0776_smaller.jpg')">
    <header>
    <h1>LAPINEL ARTS LEATHERWORKS</h1>
    <nav>
    <div id="mobileTrigger"><i class="fa fa-bars"></i></div>
    <ul>
    <li><a href="#">ABOUT US</a></li>
    <li><a href="#">PROCESS</a></li>
    <li><a href="#">PRODUCTS<span><i class="fa fa-bars"></i></span></a>
    <ul>
    <li><a href="#">PURSES</a></li>
    <li><a href="#">POUCHES</a></li>
    <li><a href="#">TOTES</a></li>
    <li><a href="#">WALLETS</a></li>
    </ul>
    </li>
    <li><a href="#">CART</a></li>
    <li><a href="#">CONTACT</a></li>
    </ul>
    </nav>
    </header>
    <section class="about">
    <h2>PURSES</h2>
    <p>There are several styles and sizes of purses available. Custom orders can be arranged but most of these purses are unique and with limited runs of art styles.</p>
    <p>Please click on the detail button for larger and additional views and the opportunity to add the item to your cart.<strong></strong></p>
    </section>
    <div id="hover-image">
    <div class="wrap">
    <!-- Define all of the tiles: -->
    <div class="box">
    <div class="boxInner">
    <img src="810_0856 copy.jpg" />
    <div class="titleBox">
    <a href="http://www.bbc.co.uk"> Details</a>
    </div>
    </div>
    <!-- end boxInner -->
    </div>
    <!-- end box -->
    <div class="box">
    <div class="boxInner">
    <img src="810_0859 copy.jpg" />
    <div class="titleBox">
    <a href="http://www.bbc.co.uk"> Details</a>
    </div>
    </div>
    <!-- end boxInner -->
    </div>
    <!-- end box -->
    <div class="box">
    <div class="boxInner">
    <img src="810_0877_edited-1 copy.jpg" />
    <div class="titleBox">
    <a href="http://www.bbc.co.uk">Details</a>
    </div>
    </div>
    <!-- end boxInner -->
    </div>
    <!-- end box -->
    <div class="box">
    <div class="boxInner">
    <img src="810_0861 copy.jpg" />
    <div class="titleBox">
    <a href="http://www.bbc.co.uk"> Details</a>
    </div>
    </div>
    <!-- end boxInner -->
    </div>
    <!-- end box -->
    </div>
    <div class="box">
    <div class="boxInner">
    <img src="http://oddiant.poatemisepare.ro/wp-content/uploads/Viceroy-Butterfly-Limenitis-archippus.j pg" />
    <div class="titleBox">
    <a href="http://www.bbc.co.uk"> Details</a>
    </div>
    </div>
    <!-- end boxInner -->
    </div>
    <!-- end box -->
    <div class="box">
    <div class="boxInner">
    <img src="http://oddiant.poatemisepare.ro/wp-content/uploads/Viceroy-Butterfly-Limenitis-archippus.j pg" />
    <div class="titleBox">
    <a href="http://www.bbc.co.uk"> Details</a>
    </div>
    </div>
    <!-- end boxInner -->
    </div>
    <!-- end box -->
    <div class="box">
    <div class="boxInner">
    <img src="http://oddiant.poatemisepare.ro/wp-content/uploads/Viceroy-Butterfly-Limenitis-archippus.j pg" />
    <div class="titleBox">
    <a href="http://www.bbc.co.uk"> Details</a>
    </div>
    </div>
    <!-- end boxInner -->
    </div>
    <!-- end box -->
    <div class="box">
    <div class="boxInner">
    <img src="http://oddiant.poatemisepare.ro/wp-content/uploads/Viceroy-Butterfly-Limenitis-archippus.j pg" />
    <div class="titleBox">
    <a href="http://www.bbc.co.uk">Details</a>
    </div>
    </div>
    <!-- end boxInner -->
    </div>
    <!-- end box -->
    <div class="box">
    <div class="boxInner">
    <img src="http://oddiant.poatemisepare.ro/wp-content/uploads/Viceroy-Butterfly-Limenitis-archippus.j pg" />
    <div class="titleBox">
    <a href="http://www.bbc.co.uk"> Details</a>
    </div>
    </div>
    <!-- end boxInner -->
    </div>
    </div>
    <div class="box">
    <div class="boxInner">
    <img src="http://oddiant.poatemisepare.ro/wp-content/uploads/Viceroy-Butterfly-Limenitis-archippus.j pg" />
    <div class="titleBox">
    <a href="http://www.bbc.co.uk"> Details</a>
    </div>
    </div>
    <!-- end boxInner -->
    </div>
    <div class="box">
    <div class="boxInner">
    <img src="http://oddiant.poatemisepare.ro/wp-content/uploads/Viceroy-Butterfly-Limenitis-archippus.j pg" />
    <div class="titleBox">
    <a href="http://www.bbc.co.uk"> Details</a>
    </div>
    </div>
    <!-- end boxInner -->
    </div>
    <div class="box">
    <div class="boxInner">
    <img src="http://oddiant.poatemisepare.ro/wp-content/uploads/Viceroy-Butterfly-Limenitis-archippus.j pg" />
    <div class="titleBox">
    <a href="http://www.bbc.co.uk"> Details</a>
    </div>
    </div>
    <!-- end boxInner -->
    </div>
    <!-- end wrap -->
    <footer>
      <div class="footerBox"><a href="mailto:[email protected]">EMAIL CATHY </a></div>
    <div class="footerBox"><a href="https://www.facebook.com/LapinelArtsLeatherwork"> FACEBOOK</a></div>
    <div class="footerBox">COPYRIGHT 2015</div>
    </footer>
    </div>
    </body>
    </html>

    <!DOCTYPE>
    <html>
    <head>
    <meta charset="UTF-8">
    <title>Lapinel Arts Leatherwork</title>
    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
    <link href='http://fonts.googleapis.com/css?family=Overlock:400,700|Simonetta:400,900|Marcellus|Junge' rel='stylesheet' type='text/css'>
    <style>
         box-sizing: border-box;
    body {
        margin: 0;
        padding: 0;
        background: #fff;
        font: 85%/90% 'Lucida Sans',sans-serif;
        background-color: #cfc6b0;
    .wrap {
         overflow: hidden;
    .box {
        float: left;
        position: inherit;
        width: 25%;
        text-align: center;
        margin-bottom: 24px;
        white-space: inherit;
    .boxInner {
         position: relative;
         text-align: center;
         margin: 0 12px;
         overflow: hidden;
    img {
         max-width: 100%;
    .titleBox {
        position: absolute;
        bottom: 10px;
        left: 130px;
        right: 0px;
        margin-bottom: -50px;
        background: #000;
        background: rgba(0, 0, 0, 0.5);
        color: #FFF;
        padding: 10px;
        text-align: center;
        -webkit-transition: all 0.3s ease-out;
        -moz-transition: all 0.3s ease-out;
        -o-transition: all 0.3s ease-out;
        transition: all 0.3s ease-out;
    .titleBox h2 {
         font-size: 16px;
         margin: 0;
         padding: 0 0 5px 0;
    .titleBox a {
         text-decoration: none;
         color: #fff;
    .boxInner:hover .titleBox {
         margin-bottom: 0;
    </style>
    <style>
    section, header, nav {
        display: block;
        background-color: #cfc6b0;
        box-sizing: border-box;
    body {
        font-family: 'Marcellus', normal;
        background-image: url(DRA-042010-LeatheryTexture-MBFT.jpg);
        font-size: 90%;
        line-height: 140%;
        color: #555;
        margin: 0 auto;
        padding: 0;
        background-color: #FFF;
        width: 1000px;
        max-width: 85%;
    #hover-image {
        background-color: #cfc6b0;
        text-align: center;
        height: 2000px
        overflow: hidden;
        overflow: hidden;
    img {
         max-width: 100%;
         height: auto;
    .container {
    width: 85%;
    max-width: 1000px;
    margin: 0 auto;
    color: #000;
    header h1 {
         font-size: 300%;
         line-height: 150%;
         text-align: center;
          letter-spacing: 4px;
          padding: 20px 0;
          color: #000;
          font-weight: bold;
    /* top level navigation */
    nav {
         background-color: #E5E4E2;
    nav ul {
         display: block;
         text-align: center;
         margin: 0;
         padding: 0;
    nav li {
         margin: 0;
         padding: 0;
         display: inline;
         position: relative;
    nav a {
        display: inline-block;
        text-decoration: none;
        padding: 10px 25px;
        color: #000;
    nav a:hover {
        background-color: #cfc6b0;
        color: #000;
    nav span {
         display: none;
    /* droplist navigation */
    nav ul ul {
         position: absolute;
         z-index: 1000;
         left: 0;
         top: 2em;
         background-color: #E5E4E2;
         text-align: left!important;
         display: none;
    nav ul ul li a {
         display: block;
         width: 12em;
         border-top: 1px dotted #ccc;
    .about {
         padding: 0 8%;
         margin: 0 auto;
         text-align: center;
         background-color: #E5E4E2;
    .about h2 {
        font-size: 260%;
        line-height: 200%;
        margin: 0;
        padding: 0;
        color: #000;
    .about p {
         font-size: 110%;
         line-height: 150%;
         margin: 0;
         padding: 0 0 20px 0;
    .productsWrapper {
         background-color: #000;
         overflow: hidden;
         padding: 30px 25px;
    .product {
         float: left;
         width: 25%;
         padding: 12px;
         text-align: center;
         color: #fff;
    .product img {
         border: 1px solid #fff;
    .view_details {
         ext-decoration: none;
         display: inline-block;
         padding: 15px 20px;
         border-radius: 6px;
         border: 1px dotted #ccc;
         color: #555;
         background-color: #fff;
    .view_details:hover {
         background-color: #E5E4E2;
    #mobileTrigger {
         padding: 10px 25px;
         font-size: 120%;
         display: none;
         color: #000;
    }footer {
         clear: both;
         background-color: #cfc6b0;
         padding: 30px;
         color: #fff;
         text-align: center;
         overflow: hidden;
    footer a {
         text-decoration: none;
         color: #000;
        float: left;
        width: 33.33%;
        color: #000;
        border: #000
    .footerBox {
        float: left;
        width: 33.33%;
        color: #000;
    </style>
    <script type="text/javascript" src="http://lapinelarts.com/JS/jquery-1.11.2.min.js"></script>
    <script type="text/javascript" src="http://lapinelarts.com/JS/jquery.cycle2.min.js"></script>
    <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
    <script>
    $(document).ready(function() {
    //activate mobile navigation icon when window is 768px
    $('#mobileTrigger').css('cursor','pointer').click(function() {
    $('#mobileTrigger i').toggleClass('fa-bars fa-times');
    $('nav ul').toggle();
    // show main desktop navigation onresize/hide sub navigation
    $(window).on('resize', function(){
    var win = $(this); //this = window
    if (win.width() > 768) {
    $('nav ul').show();
    $('nav ul ul').hide();
    //listen for navigation li being clicked
    $('nav ul li').click(function() {
    $(this).find('ul').slideToggle();
    //toggle font awesome icons
    $(this).find('i').toggleClass('fa-bars fa-times');
    //events if window is less than 768px
    if ($(window).width() < 768){
    //stops submenu sliding up when mouse leaves mobile
    $('nav ul ul').show();
    else {
    //activate desktop submenu on hover
    $('nav ul li').mouseenter(function() {
    $(this).find('ul').slideToggle();
    //toggle font awesome icons
    $(this).find('i').toggleClass('fa-bars fa-times');
    //desktop submenu slides up when mouse leaves ul/li
    $('nav ul ul').mouseleave(function() {
    $(this).slideUp();
    $('nav ul li').mouseleave(function() {
    $(this).find('ul').slideUp();
    function MM_swapImgRestore() { //v3.0
         var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
    function MM_preloadImages() { //v3.0
         var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
         var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
         if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
    function MM_findObj(n, d) { //v4.01
         var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
          d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
          if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
         for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
    if(!x && d.getElementById) x=d.getElementById(n); return x;
    function MM_swapImage() { //v3.0
         var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
          if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
    </script>
    <style type="text/css">
    </style>
    <style>
    @media screen and (max-width: 768px) {
    .container {
         width: 100%;
    .product {
         width: 50%;
    #mobileTrigger {
         display: block;
         text-align: right;
    nav ul {
         display: none;
    nav li {
         display: block;
         text-align: left;
    nav a {
         display: block;
         font-size: 120%;
         border-top: 1px dotted #ccc;
    nav span {
         display: inline-block;
         float: right;
         font-size: 130%;
    /* droplist navigation */
    nav ul ul {
         position: static;
    nav ul ul li a {
         width: 100%;
    body: {
        font-size: 100%;
    @media screen and (max-width: 480px) {
    .product {
         float: none;
         width: 100%;
    body: {
        font-size: 95%;
    body,td,th {
         font-family: Marcellus, normal;
    #copyright {
         color: #000;
         font-weight: bold;
    </style>
    </head>
    <body onLoad="MM_preloadImages('810_0776_smaller.jpg')">
    <header>
    <h1>LAPINEL ARTS LEATHERWORKS</h1>
    <nav>
    <div id="mobileTrigger"><i class="fa fa-bars"></i></div>
         <ul>
              <li><a href="#">ABOUT US</a></li>
              <li><a href="#">PROCESS</a></li>
              <li><a href="#">PRODUCTS<span><i class="fa fa-bars"></i></span></a>
         <ul>
                   <li><a href="#">PURSES</a></li>
                   <li><a href="#">POUCHES</a></li>
                   <li><a href="#">TOTES</a></li>
                   <li><a href="#">WALLETS</a></li>
    </ul>
    </li>
    <li><a href="#">CART</a></li>
    <li><a href="#">CONTACT</a></li>
    </ul>
    </nav>
    </header>
    <section class="about">
    <h2>PURSES</h2>
    <p>There are several styles and sizes of purses available. Custom orders can be arranged but most of these purses are unique and with limited runs of art styles.</p>
    <p>Please click on the detail button for larger and additional views and the opportunity to add the item to your cart.<strong></strong></p>
    </section>
    <div id="hover-image">
    <div class="wrap">
    <div class="box">
    <div class="boxInner">
    <img src="810_0856 copy.jpg" />
    <div class="titleBox">
    <a href="http://www.bbc.co.uk"> Details</a>
    </div>
    </div>
    <!-- end boxInner -->
    </div>
    <!-- end box -->
    <div class="box">
    <div class="boxInner">
    <img src="810_0859 copy.jpg" />
    <div class="titleBox">
    <a href="http://www.bbc.co.uk"> Details</a>
    </div>
    </div>
    <!-- end boxInner -->
    </div>
    <!-- end box -->
    <div class="box">
    <div class="boxInner">
    <img src="810_0877_edited-1 copy.jpg" />
    <div class="titleBox">
    <a href="http://www.bbc.co.uk">Details</a>
    </div>
    </div>
    <!-- end boxInner -->
    </div>
    <!-- end box -->
    <div class="box">
    <div class="boxInner">
    <img src="810_0861 copy.jpg" />
    <div class="titleBox">
    <a href="http://www.bbc.co.uk"> Details</a>
    </div>
    </div>
    <!-- end boxInner -->
    </div>
    <!-- end box -->
    </div>
    <div class="box">
    <div class="boxInner">
    <img src="810_0856 copy.jpg" />
    <div class="titleBox">
    <a href="http://www.bbc.co.uk"> Details</a>
    </div>
    </div>
    <!-- end boxInner -->
    </div>
    <!-- end box -->
    <div class="box">
    <div class="boxInner">
    <img src="810_0859 copy.jpg" />
    <div class="titleBox">
    <a href="http://www.bbc.co.uk"> Details</a>
    </div>
    </div>
    <!-- end boxInner -->
    </div>
    <!-- end box -->
    <div class="box">
    <div class="boxInner">
    <img src="810_0877_edited-1 copy.jpg" />
    <div class="titleBox">
    <a href="http://www.bbc.co.uk">Details</a>
    </div>
    </div>
    <!-- end boxInner -->
    </div>
    <!-- end box -->
    <div class="box">
    <div class="boxInner">
    <img src="810_0861 copy.jpg" />
    <div class="titleBox">
    <a href="http://www.bbc.co.uk"> Details</a>
    </div>
    </div>
    <!-- end boxInner -->
    </div>
    <!-- end box -->
    <div class="box">
    <div class="boxInner">
    <img src="810_0856 copy.jpg" />
    <div class="titleBox">
    <a href="http://www.bbc.co.uk"> Details</a>
    </div>
    </div>
    <!-- end boxInner -->
    </div>
    <!-- end box -->
    <div class="box">
    <div class="boxInner">
    <img src="810_0859 copy.jpg" />
    <div class="titleBox">
    <a href="http://www.bbc.co.uk"> Details</a>
    </div>
    </div>
    <!-- end boxInner -->
    </div>
    <!-- end box -->
    <div class="box">
    <div class="boxInner">
    <img src="810_0877_edited-1 copy.jpg" />
    <div class="titleBox">
    <a href="http://www.bbc.co.uk">Details</a>
    </div>
    </div>
    <!-- end boxInner -->
    </div>
    <!-- end box -->
    <div class="box">
    <div class="boxInner">
    <img src="810_0861 copy.jpg" />
    <div class="titleBox">
    <a href="http://www.bbc.co.uk"> Details</a>
    </div>
    </div>
    <!-- end boxInner -->
    </div>
    <!-- end box -->
    <!-- end wrap -->
    <footer>
    <div class="footerBox"><a href="mailto:[email protected]">EMAIL CATHY </a></div>
    <div class="footerBox"><a href="https://www.facebook.com/LapinelArtsLeatherwork"> FACEBOOK</a></div>
    <div class="footerBox">COPYRIGHT 2015</div>
    </footer>
    </div>
    </body>
    </html>

  • Some questions about importing HTML files

    Hi, folks
    Let's suppose we want to import a pack of HTML files formatted in HTML5 wit's it's CSS into a double-oriented folio. A couple or three questions about that, please:
    1. Is there a limit for a reasonable quantity of HTML files I can import into a folio? I mean.. 100 would be way too much, for instance?
    2. These HTML files could be navigated and referenced from inside TOC-pages made in InDesign,right? (navto://..., I gues?)
    2. Will it be possible, by means of HTML adaptative design techniques, to treat both orientations (vertical and horizontal) as different viewports or screen sizes so that the design adapts for instance the column width with its CSS?
    3. That said, will the InDesign final app. respect that adaptative CSS rules?
    I am asking this because we are looking for a way to inject big quantities of content with a very similar design into our application in a really fast and automatizable way and I have the suspicion* that importing HTML5 preformated CSS files could be the a very good and simple alternative to importing XML into InDesign templates as we start out content as tagged almost-html files.
    Thanks a lot
    Gustavo Sánchez (Posting from Madrid)

    I assume you are asking about using HTML articles.
    1. There is no limit beyond simply keeping things reasonable.
    2. Yes. Just use navto://articlename
    3. Yes. I've used min-width of 768 and max width of 1024 to control it.
    4. InDesign does not enter into any of this with the exception of using the folio builder panel. Everything else is done in Dreamweaver or whatever program you decide to use for the article.
    If you want to restrict the HTML articles to one orientation or the other, use the _h and _v suffixes.
    Bob

  • A lil' OT - JS redirect question

    I think I need to do a round trip back to the server, in
    order to get the
    screen.width and make it available to my server-side code.
    I would like to make this an automatic, seamless,
    unnoticeable process, as
    far as the end user is concerned.
    B/c JS and myself aren't the best of mates (in fact, we
    hardly talk these
    days :-), I'm not sure what is possible or how to do this.
    But here's what
    I'm thinking:
    In a JS function, set a var like: width=screen.width;
    and then redirect the page back to itself but with the width
    var appended in
    the query string.
    Perhaps set this to the onload event of the body tag?
    If that's going to make a url var available to that page, and
    that's the
    most seamless way to do this, great, can someone please flesh
    out the (very)
    broadstrokes I've got please? Tks.
    If there's a better way, and there has to be, surely, please
    can someone
    dazzle me with their helpful brilliance because I'm clueless
    Cheers,
    Lossed
    __when the only tool you have is a hammer, everything looks
    like a nail __

    I am NOT trying to ;-)
    I just want to know how to make whatever setting they have,
    available to
    coldfusion so it can then serve the most appropriate page.
    Any help with JS that will make that available, and in a
    manner as seamless
    as possible, will be fantastic.
    Anyone?
    Lossed.
    "Murray *ACE*" <[email protected]> wrote
    in message
    news:[email protected]...
    > You will NOT make the user experience better by changing
    their browser
    > viewport size.
    >
    > --
    > Murray --- ICQ 71997575
    > Adobe Community Expert
    > (If you *MUST* email me, don't LAUGH when you do so!)
    > ==================
    >
    http://www.dreamweavermx-templates.com
    - Template Triage!
    >
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    >
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    >
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    > ==================
    >
    >
    > "Lossed" <[email protected]> wrote in message
    > news:[email protected]...
    >>I have a default value of 800 wide I try to work
    towards as the min
    >>without needing the horizontal scroller.
    >> So if no JS, that's as far as it goes. If JS, I can
    try making the user
    >> experience better.
    >>
    >> I imagine most people will keep their page size at
    or very near the
    >> maximum and if I have elements that would force a
    horizontal scroller if
    >> they aren't using the full width, then so be it,
    unless someone has any
    >> better idea?
    >>
    >>
    >> "PeteC" <[email protected]>
    wrote in message
    >> news:[email protected]...
    >>> Lossed wrote:
    >>>> I think I need to do a round trip back to
    the server, in order to get
    >>>> the screen.width and make it available to my
    server-side code.
    >>>
    >>> No answer, I'm afraid, but just a question....
    what is the screen width
    >>> going to do for you? It can't tell you anything
    about the users browser.
    >>> My screen width is 1440, and my browser rarely
    goes above the equivalent
    >>> of 800 x 600. The browser may, theoretically, be
    split across both of
    >>> the screens I use - 1440 and 1280.
    >>>
    >>> Of course, if the user has javascript turned
    off, you won't need the
    >>> answer anyway...
    >>>
    >>> Regards,
    >>>
    >>> Pete.
    >>> --
    >>> Peter Connolly
    >>>
    http://www.acutecomputing.co.uk
    >>> Derby
    >>> UK
    >>> Skype ID: acutecomputing
    >>>
    >>
    >>
    >
    >

  • JScrollPane questions

    Hi, I have two questions regarding JScrollPane:
    1) I have a JPanel inside a scrollpane, but setViewportView() doesn't seem to work too well. Could anyone give me a better idea how to set the viewport view, an example perhaps? The tutorial doesn't go into much detail. For instance, let's say I have an 800 * 600 JPanel with a spot on it at 500, 300. How would I make the JScrollPane move so that this spot is in the centre?
    2) Is there a method that essentially does the same thing as clicking on one of the scrollbar arrows, so I can have four buttons (Up Down Left Right) that scroll instead of scrollbars?
    Thanks.

    #1
    sp.getViewport().scrollRectToVisible(...)
    import javax.swing.*;
    import java.awt.*;
    class Testing extends JFrame
      public Testing()
        setLocation(400,300);
        setDefaultCloseOperation(EXIT_ON_CLOSE);
        JPanel panel = new JPanel(null);
        panel.setPreferredSize(new Dimension(800,600));
        JLabel label = new JLabel("Hello World");
        label.setBounds(500,300,80,20);
        panel.add(label);
        JScrollPane sp = new JScrollPane (panel);
        sp.setPreferredSize(new Dimension(200,200));
        getContentPane().add(sp);
        pack();
        sp.getViewport().scrollRectToVisible(new Rectangle(440,210,200,200));//<-----------------------
      public static void main(String[] args){new Testing().setVisible(true);}
    }#2
    you can get the scrollbar object/s from the scrollpane and use setValue()
    you can set the scrollbar's policy as NEVER - look up the various constructors
    for JScrollpane

  • Why is the viewport markup not scaling my site correctly for mobile device?

    Firstly, thank you in advance for taking the time to look into my comment/question/issue.
    Secondly, I have ran the validation with WC3 but have not had a moment to edit and update the corrections. Hoping that will fix the (other) issue I have with the light box not working correctly.
    O.k. on to the primary issue... simply put, when viewing on my (and checking on other's devices), my site doesn't scale correctly to the viewport. Sometimes it scales correctly, but you can "pinch" the screen to zoom out and the site scales down and justifies left.
    Any thoughts as to what I have missed here?
    url:
    http://www.toddrlewis.com
    thank you again!
    -T

    Aside from the lightbox issues I am having, I was able to get the code cleaned up.
    Issue still exist after some more tinkering. Code responds, and loads to the browser size correctly. However, you can re-size on a mobile device and it backs all the way out to about 50%, and justifies left side of the browser.
    I've never ran into this type of issue before. But this is the first time I've integrated it with a site I've built from the ground up based on the Bootstrap framework.
    All other times, framework and meta tag were already applied and no issues arose.

  • Very simple question for a newb

    I'm working with the 3d camera but somehow when I'm moving in my 3d space, the camera place moves. I'm not sure what im doing wrong to move the camera. Anyway, how can I move my camera and keyframes together from the "Top" view?
    I've done it before, just dont know how.

    You actually answered your own question. Switch to Top view and sure you have record animation turned off . If you can's see the camera and the objects in the view, make sure nothing is selected and press F to fit all scene items into the viewport. If you have the proper overlays turned on, when you select the camera you will see it, and it's motion path. You can now use the adjust tool to click and drag the camera. The keyframes will follow.

  • Turn off light icons in viewport

    Here's the quick 'n dumb question of the day:  How the heck do I turn off the light icons in the viewport?

    You can go into View Options (View > View Options) to control part of a spotlight's wireframe. If you want light icons completely off (along with a bunch of other stuff), you can deselect the Show Layer Controls option (View > Show Layer Controls).
    Jeff

  • Dumb newbie question on iphone development

    Hi there, just a quick dumb question: Can i develop Iphone apps in Windows platform? This is b'coz I dun have Mac machine.

    a simple answer is YES in opposite of what you read here.
    +I'm a .NET developer and I started building web apps in .NET (ASP.NET).+
    The iPhone/iPod Touch supports 2 different ways to develop something for it, a Web Application (applications that runs on Safari browser, like Facebook and Wordpress) and a SDK Application (Self contain applications, like games, utilities, etc). *Under Windows, you can do any Web Application*, you will need a Mac to do SDK Applications
    Reading the Wrox book entitled: Professional iPhone Application Development (ISBN 0470251557) in page 5 the writer tells about 4 levels to do Web Apps:
    *Level 1 - Full compatible website/application*
    The ground level approach is to develop a Web site/app that is “ iPhone/iPod touch – friendly ” and is fully compatible with the Apple mobile devices. These sites avoid using technologies that the Apple mobile devices do not support, including Flash, Java, and other plug - ins. The basic structure of the presentation layer also maximizes use of blocks and columns to make it easy for users to navigate and zoom within the site. This basic approach does not do anything specific for iPhone/iPod touch users, but makes sure that there are no barriers to a satisfactory browsing experience.
    (just like http://del.icio.us/
    *Level 2 - Web site/application optimized for Safari*
    The second level of support for iPhone and iPod touch is to not only provide a basic level of experience for the Mobile Safari user, but also to provide an optimized user experience for users who use Safari browsers, such as utilizing some of the enhanced WebKit CSS properties supported by Safari.
    *Level 3 - Dedicated iPhone/iPod Touch web site/application*
    A third level of support is to provide a Web site tailored to the viewport dimensions of the iPhone and iPod touch and provide a strong Web browsing experience for Apple device users. However, while these sites are tailored for iPhone/iPod touch viewing, they do not always seek to emulate Apple UI design. And, in many cases, these are often stripped - down versions of a fuller Web site or
    application.
    (just like Amazon.com and Facebook)
    *Level 4 - Native - looking iPhone/iPod touch application*
    The final approach is to provide a Web application that is designed exclusively for iPhone and iPod touch and closely emulates the UI design of native applications. One of the design goals is to minimize user awareness that they are even inside of a browser environment. Moreover, a full - fledged iPhone application will, as is relevant, integrate with iPhone - specific services, including Phone, Mail, and Google Maps.
    I did 2 web apps using Dreamweaver for Windows, using Level 4, coding plain HTML - there is no visual aid, but you just pick up an iPhone/iPod Touch (or if you don't have this, use Safari browser or any WebKit Browser).
    You can always start here
    Remember, if you really want to build a self contain application in Objective-C/Java, then you need a Mac running Leopard (Mac OS X 10.5), with XCode (the Mac Visual Studio) and the iPhone SDK
    Hope that with this you can see some light under Windows

  • JTextPane and viewports

    Hi,
    I asked this question before but I may have made it too complex a question and may have confused some of you so I'll ask it a little differently.
    Here is what I would like to do. Lets say I define a JTextPane to be 10 inches wide and 10 inches in height, but I would only like the viewable area to be only 5x5 inches wide at a time. I want to be able to view the entire JtextPane, but only in 5" by 5" viewable window. When I get to the far right side, or bottom of the viewable window, the window would then move with my next arrow key press. Can someone tell me if this is possible. I've tried some things with scrollbars and a JScrollpane with no luck. I have to have the ability to stop the user when they reach their 10 inch margin and once I introduce scroll bars, there is no way to stop them at 10 inches. This problem comes from the fact that I want to be able to define a Jtextpane to be larger than the screen size someone is limited too, but I still want to limit it to 10 inches. Any ideas at all???
    Joe Crew

    Denis,
    I thought I would post this as a guide to anyone else having the same problem. Not shown below is where I created a BorderLayout and my own personal toolbar for text editing commands which I added to the "North" border. Here is the pseudocode for creating a JTextPane that you can create at a size larger than your PC screen size, have scrollbars, and still limit the width of the JTextPane area. The paradox was once I turn on scrollbars I could no longer limit the size of the JTextPane. Note that in main() not shown here I specified the application to have a setSize of 640x480.
    <CODE>
    private void setScrollBars() {
    // These next few variables were actually declared in another
    // part of the overall application, I just added them here
    // for the sake of clarity. p1 was used for my toolbar,
    // thus p2 is shown here.
    JPanel p2 = new JPanel();
    JTextPane jpane = new JTextPane();          
    Dimension myDim = new Dimension();
    myDim.setSize(1000, 1000);          
    jpane.setPreferredSize(myDim);
    p2.add(jpane);
    jscroll = new JScrollPane(p2);
    jscroll.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
    jscroll.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
    add(jscroll, "Center" );
    </CODE>
    The mistake I made previously, which I am sure could still be fixed by someone, was I added the JTextPane to the JScrollbar, then added the JScrollbar to the JPanel. I could not control the actual size of the JTextPane width or height this way. By adding the JtextPane to the Panel and then adding the panel to the JScrollPane, the panel does all of the scrolling and I can specify the exact size of the JTextPane I want. You also don't have to do any monkey business with moving viewports around this way either.
    One issue yet to be addressed by this method is even though you can't see the text beyond the area you create for the JTextPane, text still gets entered past the horizontal limit. I'm working on that issue as I type this, but I wanted to at least post the main solution before this original post got too outdated.
    joberoni

  • Which meta name="viewport" tag best used for Mac/Safari iPhone?

    My test page URL using auto generated tag is: http://02ca0d2.netsolhost.com/action_appliance_02/index.html
    Received suggestion as a result of posting question on the PVII forum, and included in the response was the suggestion that the DW CS6 automatically generates would be best changed to another, as follows:
    DW CS6 tag:  <meta name="viewport" content="width=device-width, initial-scale=1">
    The preferred tag for responsive pages suggested alternative was:
    Suggested alternative:  <meta name="viewport" content="width=device-width">
    Can both be used in some way without conflict, or which one would be best, if indeed there is a preference or desired "best practice" across the broadest spectrum of available devices being in common use?
    Again, this seems applicable to iPhones, and Safari, and as I'm Mac/Safari oriented, this opened another door in responsive design of which I am absorbing; or trying to understand.
    I did research the following link but remain unable to make a decision at this juncture.
    https://developer.apple.com/library/IOS/documentation/AppleApplications/Reference/SafariWe bContent/UsingtheViewport/UsingtheViewport.html
    Thanks in advance.

    Originally Dreamweaver CS6 used this:
    <meta name="viewport" content="width=device-width">
    The latest update of Dreamweaver CS6 and Dreamweaver CC now use this:
    <meta name="viewport" content="width=device-width, initial-scale=1">
    The second version is considered to be preferable, although there's not much to choose between them. The important element is setting width to device-width. Without it, most smartphones will scale the page to fit into a nominal viewport approximately 960px wide.
    By the way, there's nothing wrong with working on a specific operating system, but don't become blinkered by your Mac/Safari preference. It's the World Wide Web, not the Mac/Safari Web.

  • Question about scrolling map

    i want to start some sort of game in java... and the only thing i really dont understand is graphics, so i figure i'd ask a question and maybe someone could point me in the right direction. i tried looking stuff up on google, but nothing that was revliant (sp) was returned.
    basically, im trying toget some sort of moving map going on. ie, those games that has a big map, and as u move the map changes scenes (think grand thieft auto 1 and 2)
    thanks

    Just reply if I spoke like you were better than you are at programming ;)
    That's a though point for a beginner! I will not publish any code because it's too long but if you want some I'll send it to you via mail. The basic point is to build a map with square tiles ( I suppose you're able of doing sprites? If not, you should concentrate on sprites first ) that build a grid. First make a code that scrolls the map when hitting the arrows. I use an 2D array of ints that represent the tiles. e.g.:
    int[][] tile=new int{
    {0,1,2,3},
    {0,1,2,3},
    {0,1,2,3}
    this code may be wrong, just correct it ;)
    then when the image has to be drawn, make a double for statement that draws tiles from the scrolling position where the player is to the limit of the screen. e.g.:
    for(n=posX; n<posX+4; n++){
    for(i=posY; i<posY+4; i++){
    // draw tile[n] at n*100 by i*100
    this code assumes you have 100x100 tiles that must fill a viewport smaller than 400x400. Then you will be able to add code that will enable smoother scrolling.
    Just reply if I spoke like you were better than you are at programming ;)

  • Can a website's viewport meta tag be over-ridden in Firefox?

    I'm hoping there's an add-on to override viewport meta tags. I checked about:config and didn't see anything relevant.
    A website I use, tumblr, does no browser version checking, and mis-uses the viewport setting to apply a value of "960" to every device. Since my laptop's browser window is 1230 actual pixels, the tumblr webpage is stretched out, which makes images look terrible.
    Their viewport tag minus the lesser/greater symbols:
    meta name="viewport" content="width=960" id="viewport"
    I'd like to override their viewport tag completely, as if it did not exist, or substitute one with <i>content=”width=device-width, initial-scale=1”</i> so I'll have a 1-to-1 pixel ratio.
    Not much hope of getting tumblr to stop treating all devices the same; their code to get the language version from browsers for font settings has been broken for years. I have reported the viewport problem to tumblr support, however.
    I'm using Firefox 25.0.1 for Windows (Vista).

    I'm sorry that no one replied to your question.
    If you're looking for a Firefox add-on, you can search through addons.mozilla.org or ask a question on the Mozilla Add-ons forum, which is here:
    * https://forums.mozilla.org/addons/

  • Simple question I think, add JPanel to JScrollPane

    I would imagine that for anyone with experience with Java this will be a simple problem. Why can't I add a JPanel to a JScrollPane using myScrollPane.Add(myPanel); ?? it seems to get hidden...
    This works correctly:
         //Create a panel
         JPanel panel = new JPanel(new FlowLayout());
         //Make it pink
         panel.setBackground(Color.pink);
         //Make it 400,400
         panel.setPreferredSize(new Dimension(400,400));
         //Create a Scrollpane
         JScrollPane scrollPane = new JScrollPane(panel);
         //Make it 300,300
         scrollPane.setPreferredSize(new Dimension(300,300));
         //Create a JFrame
         JFrame frame = new JFrame("Test Scrollpane");
         frame.setLayout(new FlowLayout());
         //Set close operation
         frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         //Set its size
         frame.setSize(600,600);
         //Add Scrollpane to JFrame
         frame.add(scrollPane);
         //Show it
         frame.setVisible(true);
    This doesnt:
         //Create a panel
         JPanel panel = new JPanel(new FlowLayout());
         //Make it pink
         panel.setBackground(Color.pink);
         //Make it 400,400
         panel.setPreferredSize(new Dimension(400,400));
         //Create a Scrollpane
         JScrollPane scrollPane = new JScrollPane();
         scrollPane.add(panel);
         //Make it 300,300
         scrollPane.setPreferredSize(new Dimension(300,300));
         //Create a JFrame
         JFrame frame = new JFrame("Test Scrollpane");
         frame.setLayout(new FlowLayout());
         //Set close operation
         frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         //Set its size
         frame.setSize(600,600);
         //Add Scrollpane to JFrame
         frame.add(scrollPane);
         //Show it
         frame.setVisible(true);

    rcfearn wrote:
    I would appreciate it you could read the sample code, I am asking the question as to why I have to do this? For structural reasons I don't want to have to add the JPanel during instatiation of the JScrollPane...Please read the [jscrollpane api.|http://java.sun.com/javase/6/docs/api/javax/swing/JScrollPane.html] To display something in a scroll pane you need to add it not to the scroll pane but to its viewport. If you add the component in the scroll pane's constructor, then it will be automatically added to the viewport. if you don't and add the component later, then you must go out of your way to be sure that it is added to the viewport with:
    JScrollPane myScrollPane = new JScrollPane();
    myScrollPane.getViewport().add(myComponent);

Maybe you are looking for

  • Multiple tabs with flash or heavy js crash firefox

    Has been may years already that this keeps happening to me if i open around 150+ tabs (depends on the content of the tabs) or if i open 20+ tabs of youtube (might happen with other video platforms too but i haven't tested that) makes firefox crash af

  • Video Playback Fine On iPhone - Horrible On Computer

    Seen others with this issue. But think this is NOT talked about enough, therefore NOT addressed. Hopefully someone can help me ? Summary: Record video on iPhone, plays back great on iPhone ( A PHONE !!). Get raw footage to a computer, video plays bac

  • Help with InsertPages Function

    I am attempting to combine multiple .RTF files into a single PDF file.     In the VBA code below, the InsertPages function causes a compile error.  Can anyone tell me what I am doing wrong?    Dim AVDoc As Object    Dim AVDocAdd As Object    Dim PDDo

  • RSCRM_REPORT without access to sm37

    To perform T-Code RSCRM_REPORT  we need to launch jobs in Production. So we need access to launch any job in SM37.  However, the users don't have access to SM37.  If there is some other way for the users to launch a job other than through SM37 would

  • NVidia video card- Lightroom freezes at startup, stalls, crashes when switching modules [Windows]

    Issue: Adobe Photoshop Lightroom freezes when you start, crashes when you switch between modules, displays blank screens in Slideshows, stalls frequently or runs extremely slowly.  Solution: The nVIDIA nView Multi-Display Technology software (also kn