Scrollbars in the middle of panel

My panel scrollbars are in the middle of the panel (see attached screenshot). I don't know how I did it. Worse though, I don't know how to get them back to the edges of the panel.
Any help is appreciated. BTW, I'm using LV 8.6. If I create a new VI, everything is normal so I could just copy everything over ...
Thanks,
H
Attachments:
VI_Scrollbar_Problem.JPG ‏69 KB

Edit the Background in the sense...
Shift + Right Click will give that pallet
Like this... It may be become invisible....
For more questions pleae post your code...
<<Kudos are welcome>>
ELECTRO SAM
For God so loved the world that he gave his one and only Son, that whoever believes in him shall not perish but have eternal life.
- John 3:16

Similar Messages

  • How to get only the middle panel to resize and show a scrollbar ?

    I have a window(frame) that has three panels - top, middle and bottom. When the window is shrunk vertically, I need a scrollbar to show up for the middle panel only. So the maximum vertical shrink possible would be the sum of the top and bottom panels plus some small amount (to see the middle panel scroll bar). So the top and bottom panels would always show completely (height wise). Please review my code and suggest corrections. I've tried couple of different ways but without success....The code below is my most recent attempt.
    Thanks.....
    import java.awt.*;
    import java.awt.Color.*;
    import java.awt.event.MouseEvent;
    import java.awt.event.MouseListener;
    import java.awt.event.MouseMotionListener;
    import javax.swing.*;
    import javax.swing.plaf.ComponentUI;
    public class PanelResizingA extends JPanel implements MouseListener, MouseMotionListener
          * @param args
         public static void main(String[] args)
              JFrame frame = new JFrame ("All Panels");
              PanelResizingA allThreePanels = new PanelResizingA();
              JScrollPane allHorizontalScroll = new JScrollPane();
              //frame.add(allHorizontalScroll);
              allHorizontalScroll.setViewportView(allThreePanels);
              allHorizontalScroll.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);
              allHorizontalScroll.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER);
              frame.getContentPane().add(allHorizontalScroll);
              frame.setVisible(true);
              frame.pack();
         private JPanel topPanel;
         private JPanel midPanel;
         private JPanel bottomPanel;
         private JPanel allPanels;
         private JScrollPane midVerticalScroll;
         private JScrollPane allHorizontalScroll;
         private JLabel posnCheckLabel;
         private int panelWidth = 0;
         private int topPanelHt = 0;
         private int midPanelHt = 0;
         private int bottomPanelHt = 0;
         private int allPanelsHt = 0;
         private Point pointPressed;
         private Point pointReleased;
         public PanelResizingA()
              createAllPanels();
         private void createAllPanels()
              topPanel = new JPanel();
              midPanel = new JPanel();
              bottomPanel = new JPanel();
              allPanels = new JPanel();
              posnCheckLabel = new JLabel("Label in Center");
              panelWidth = 300;
              topPanelHt = 150;
              midPanelHt = 200;
              bottomPanelHt = 150;
              allPanelsHt = topPanelHt + midPanelHt + bottomPanelHt;
              //topPanel.setMinimumSize(new Dimension(panelWidth-150, topPanelHt));
              //topPanel.setMaximumSize(new Dimension(panelWidth, topPanelHt));
              topPanel.setPreferredSize(new Dimension(panelWidth, topPanelHt));
              topPanel.setBorder(BorderFactory.createLineBorder(Color.BLACK));
              midPanel.setMinimumSize(new Dimension(panelWidth-150, midPanelHt-150));
              midPanel.setMaximumSize(new Dimension(panelWidth, midPanelHt));
              midPanel.setPreferredSize(new Dimension(panelWidth, midPanelHt-3));
              midPanel.setBorder(BorderFactory.createLineBorder(Color.BLACK));
              midPanel.setLayout(new BorderLayout());
              midPanel.add(posnCheckLabel, BorderLayout.CENTER);
              //midPanel.add(new PanelVerticalDragger(midPanel), BorderLayout.SOUTH);
              //bottomPanel.setMinimumSize(new Dimension(panelWidth-150, bottomPanelHt));
              //bottomPanel.setMaximumSize(new Dimension(panelWidth, bottomPanelHt));
              bottomPanel.setPreferredSize(new Dimension(panelWidth, bottomPanelHt));
              bottomPanel.setBorder(BorderFactory.createLineBorder(Color.BLACK));
              allPanels.setMinimumSize(new Dimension (panelWidth-150, allPanelsHt-300));
              allPanels.setMaximumSize(new Dimension(panelWidth+25, allPanelsHt+25));
              allPanels.setPreferredSize(new Dimension(panelWidth, allPanelsHt));
              midVerticalScroll = new JScrollPane();
              //midPanel.add(midVerticalScroll);
              midVerticalScroll.setViewportView(midPanel);
              midVerticalScroll.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
              midVerticalScroll.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED);
              allPanels.setLayout(new BoxLayout(allPanels,BoxLayout.Y_AXIS));
              allPanels.add(topPanel);
              allPanels.add(midPanel);
              allPanels.add(bottomPanel);
              this.add(allPanels);
              addMouseListener(this);
              addMouseMotionListener(this);
         private void updateCursor(boolean on)
              if (on)
                   setCursor(Cursor.getPredefinedCursor(Cursor.S_RESIZE_CURSOR));
              else
                   setCursor(null);
         @Override
         public void mousePressed(MouseEvent e)
              pointPressed = e.getLocationOnScreen();
              updateCursor(true);
         @Override
         public void mouseDragged(MouseEvent e)
              mouseReleased(e);
              pointPressed = e.getLocationOnScreen();
         @Override
         public void mouseReleased(MouseEvent e)
              pointReleased = e.getLocationOnScreen();
              Dimension allPanelsPrefSize = this.allPanels.getPreferredSize();
              Dimension midPanelPrefSize = this.midPanel.getPreferredSize();
              Dimension allPanelsSize = this.allPanels.getSize();
              Dimension allPanelsMinSize = this.allPanels.getMinimumSize();
              int midPanelPrefHt = midPanelPrefSize.height;
              int midPanelPrefWidth = midPanelPrefSize.width;
              int maxHtDelta = allPanelsPrefSize.height - allPanelsMinSize.height;
              //int deltaY = pointPressed.y - pointReleased.y;
              Point panelLocation = this.getLocation();
              Dimension size = this.getSize();
              if (size.height < allPanelsSize.height)
                   int deltaY = pointPressed.y - pointReleased.y;
                   if (deltaY < maxHtDelta)
                        midPanelPrefHt = midPanelPrefHt-deltaY;
                   else {midPanelPrefHt = this.midPanel.getMinimumSize().height;}
                   this.midPanel.setPreferredSize(new Dimension(midPanelPrefWidth, midPanelPrefHt));
                   this.midVerticalScroll.setViewportView(this.midPanel);
                   allPanels.setLayout(new BoxLayout(allPanels,BoxLayout.Y_AXIS));
                   allPanels.add(topPanel);
                   allPanels.add(midVerticalScroll);
                   allPanels.add(bottomPanel);               
              midVerticalScroll.revalidate();
              pointPressed = null;
              pointReleased = null;
         @Override
         public void mouseEntered(MouseEvent e)
              updateCursor(true);
         @Override
         public void mouseExited(MouseEvent e)
         @Override
         public void mouseClicked(MouseEvent e)
         @Override
         public void mouseMoved(MouseEvent e)
    }Edited by: 799076 on Oct 8, 2010 12:53 PM
    Edited by: 799076 on Oct 8, 2010 12:55 PM

    Rob,
    1. Sample code
    ScrollablePanel panel = new JScrollablePanel(...);
    panel.setScrollableWidth( ScrollablePanel.ScrollableSizeHint.FIT );references a JScrollablePanel - i'm assuming this is a typo and should read new ScrollablePanel()?
    Anyway I've tried this but it still does not show a vertical scroll bar for the middle panel:
    package JavaTutes;
    import java.awt.BorderLayout;
    import java.awt.Dimension;
    import java.awt.Color;
    import javax.swing.*;
    import javax.swing.Scrollable;
    public class PanelResizingB extends JPanel
       private static final Dimension PANEL_SIZE = new Dimension(500, 250);
       private String[] labelStrings = {"Top Panel", "Middle Panel", "Bottom Panel"};
       private JScrollPane midVertScroll;
       private JScrollPane allHorzScroll;
       public PanelResizingB()
          setLayout(new BorderLayout());
          //JPanel allPanels = new JPanel();
          ScrollablePanel midPanel = new ScrollablePanel();
          midPanel.setScrollableHeight(ScrollablePanel.ScrollableSizeHint.FIT);
          //midPanel.setScrollableWidth(ScrollablePanel.ScrollableSizeHint.FIT);
          midPanel.add(new JLabel("Middle Panel"));
          midPanel.setPreferredSize(PANEL_SIZE);
          midPanel.setBorder(BorderFactory.createLineBorder(Color.BLACK));
          JPanel[] panels = new JPanel[labelStrings.length];
          for (int i = 0; i < panels.length; i++)
             panels[i] = new JPanel(new BorderLayout());
             panels.add(new JLabel(labelStrings[i]));
    panels[i].setPreferredSize(PANEL_SIZE);
    panels[i].setBorder(BorderFactory.createLineBorder(Color.BLACK));
    setLayout(new BorderLayout());
    add(panels[0], BorderLayout.NORTH);
    add(new JScrollPane(midPanel), BorderLayout.CENTER);
    add(panels[2], BorderLayout.SOUTH);
    add(new JScrollPane(allPanels));
    private static void createAndShowUI()
    JFrame frame = new JFrame("PanelResizingB");
    PanelResizingB allThreePanels = new PanelResizingB();
    JScrollPane allHorizontalScroll = new JScrollPane();
    allHorizontalScroll.setViewportView(allThreePanels);
    //allHorizontalScroll.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
    //allHorizontalScroll.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER);
    frame.getContentPane().add(allHorizontalScroll);
    //frame.getContentPane().add(new PanelResizingB());
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.pack();
    frame.setLocationRelativeTo(null);
    frame.setVisible(true);
    public static void main(String[] args)
    java.awt.EventQueue.invokeLater(new Runnable()
    public void run()
    createAndShowUI();
    I'm sure it is something simple - but I'm just not getting it.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • HT5055 Just updated to lion and my cctv access has stopped functioning all I get is a white screen in the middle of the control panel where the camera shots should be.  I think it is caused by JAVA but am confused as when i view on snow leopard it works 

    Just updated to lion and my cctv access has stopped functioning all I get is a white screen in the middle of the control panel where the camera shots should be.  I think it is caused by JAVA but am confused as when i view on snow leopard it works  can you help

    Open "Java Preferences" either from spotlight or your utilities folder...it's probably going to say you need to install a java runtime. Then just click install!

  • Scrollbar postion in the middle of scrolling context

    I'm working on a project where i give the user the ability to zoom an image,
    the problem is when the user zoom the image, the right and left scrollbars are positioned at the beggining of the FigureCanevas.
    What i want is when redrawing the image, the scrollbars should be in the middle of their scrolling context, what will give him a look on the center of the image after redrawing.
    Any idea.
    regards.
    Edited by: Otmane on May 23, 2012 3:57 PM

    Try:
    - Reset the iOS device. Nothing will be lost      
    Reset iOS device: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Restore from backup. See:                                               
    iOS: Back up and restore your iOS device with iCloud or iTunes
    - Restore to factory settings/new iOS device.                       
    If still problem, make an appointment at the Genius Bar of an Apple store since it appears you have a hardware problem.
      Apple Retail Store - Genius Bar                                              

  • Setting the scrollbar to be by default in the middle of the scrollpane

    I was wondering if there was a way to set the JScrollBar to be at the middle of the scrollpane by default. I have a handle to the scrollbar and can determine the min and max of it's range, but I don't see a place to set the scrollbar position.

    This is a runnable stand-alone app.
    import java.awt.event.WindowEvent;
    import java.awt.event.WindowListener;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.awt.Dimension;
    import java.awt.FlowLayout;
    import java.awt.Component;
    import java.awt.Color;
    import java.awt.Font;
    import javax.swing.*;
    import javax.swing.table.*;
    import java.util.*;
    public class MarketBook extends JFrame implements WindowListener,
                                                      ActionListener{
         protected final int ROW_HEIGHT = 15;
         protected final int NUM_ROW = 14;
         protected final int PREF_WIDTH = 200;
         protected final int PREF_HEIGHT = 150;
         protected final int BID_COL = 1;
         protected final int OFFER_COL = 2;
         private String instrument;
         private String mkbkID;
         private String[] instArray = {"Item1", "Item2", "Item3"};
         private String[] colNames = {"Qty", "Bid", "Offer", "Qty"};
         private Vector<String> instrumentsList = new Vector<String>();
         private DefaultTableModel dm = new DefaultTableModel(colNames, NUM_ROW);
         private DefaultTableCellRenderer renderer = new DefaultTableCellRenderer();
         JPanel contentPane = new JPanel();
         JPanel topPanel = new JPanel();
         JComboBox instList = new JComboBox(instArray);
         JTable bidOffer = new JTable(){
              public boolean isCellEditable(int row, int column){
                        return false;
         JScrollPane bidOfferScroll = new JScrollPane(bidOffer);
         public MarketBook(String _mkbkID, Vector<String> _instList){
              super(_instList.firstElement());
              this.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);
              this.mkbkID = _mkbkID;
              this.instrumentsList = _instList;
              this.instrument = instrumentsList.firstElement();
              buildGUI();
         private void buildGUI(){
              TableColumn tc = null;
              contentPane.setLayout(new BoxLayout(contentPane, BoxLayout.Y_AXIS));
              bidOfferScroll.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED);
              bidOfferScroll.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
              bidOfferScroll.setPreferredSize(new Dimension(PREF_WIDTH,PREF_HEIGHT));
              System.err.println("Max: " + bidOfferScroll.getVerticalScrollBar().getMaximum());
              System.err.println("Min: " + bidOfferScroll.getVerticalScrollBar().getMinimum());
              System.err.println("Extent: " + bidOfferScroll.getVerticalScrollBar().getVisibleAmount());
              System.err.println("Value: " + bidOfferScroll.getVerticalScrollBar().getValue());
              bidOfferScroll.getVerticalScrollBar().setValueIsAdjusting(true);
              bidOfferScroll.getVerticalScrollBar().setValue(50);
              System.err.println("Value: " + bidOfferScroll.getVerticalScrollBar().getValue());
              System.err.println("Model: " + bidOfferScroll.getVerticalScrollBar().getModel());          
                        bidOfferScroll.getVerticalScrollBar().getMaximum()-
                        bidOfferScroll.getVerticalScrollBar().getMinimum())/2);*/
              topPanel.setLayout(new FlowLayout(FlowLayout.LEFT));
              topPanel.add(instList);
              instList.addActionListener(this);
              bidOffer.getTableHeader().setFont(new Font(null, Font.BOLD, 12));
              bidOffer.setAlignmentX(JTable.CENTER_ALIGNMENT);
              bidOffer.setModel(dm);
              bidOffer.getColumnModel().getColumn(0).setPreferredWidth(40);
              bidOffer.getColumnModel().getColumn(1).setPreferredWidth(60);
              bidOffer.getColumnModel().getColumn(2).setPreferredWidth(60);
              bidOffer.getColumnModel().getColumn(3).setPreferredWidth(40);               
              bidOffer.setRowHeight(ROW_HEIGHT);
              // Set table renderer
              for(int i = 0; i < bidOffer.getColumnCount(); i++){
                   tc = bidOffer.getColumnModel().getColumn(i);
                   tc.setCellRenderer(new CustomTableCellRenderer());
              contentPane.add(topPanel);
              contentPane.add(bidOfferScroll);
              JFrame.setDefaultLookAndFeelDecorated(true);
              this.setContentPane(contentPane);
              this.pack();
              this.setVisible(true);
         public void actionPerformed (ActionEvent e){
              JComboBox cb = (JComboBox)e.getSource();
              String selectedItem = (String)cb.getSelectedItem();
              updateSelectedInst(selectedItem);
         public void windowActivated(WindowEvent arg0) {
              // TODO Auto-generated method stub
         public void windowClosed(WindowEvent arg0) {
              // TODO Auto-generated method stub
         public void windowClosing(WindowEvent arg0) {
              // TODO Auto-generated method stub
              this.setVisible(false);
              this.dispose();
              System.exit(0);
         public void windowDeactivated(WindowEvent e) {
              // TODO Auto-generated method stub
         public void windowDeiconified(WindowEvent e) {
              // TODO Auto-generated method stub
         public void windowIconified(WindowEvent e) {
              // TODO Auto-generated method stub
         public void windowOpened(WindowEvent e) {
              // TODO Auto-generated method stub
         // Perform all updates necessary when new instrument is selected
         private void updateSelectedInst(String inst){
              this.setTitle(inst);
         class CustomTableCellRenderer extends DefaultTableCellRenderer{
              public Component getTableCellRendererComponent(JTable table,
                        Object value, boolean isSelected, boolean hasFocus,
                        int row, int column){
                   Component cell = super.getTableCellRendererComponent(table,
                                       value, isSelected, hasFocus, row, column);
                   if (column == BID_COL){
                        cell.setBackground(Color.red);
                   else if (column == OFFER_COL){
                        cell.setBackground(Color.blue);
                   //cell.setFont(f)
                   return cell;
         public static void main(String args[]){
              Vector<String> tempVector = new Vector<String>();
              tempVector.add("item1");
              tempVector.add("item2");
              MarketBook marketBook1 = new MarketBook("mkbk1", tempVector);
    }

  • Can't see the middle panel of iTunes store

    Hi!
    I recently upgraded to iTunes 10.7(21) on my Mac.  Now, whenever I go to the iTunes Store, I don't see the middle panel where the recommended apps/music/songs, etc. can be seen.
    Below is a screenshot:
    Any suggestions to solve this would be appreciated.

    Perhaps try the iTunes Store loads partially or returns "Error 306" or "Error 10054" section in the Specific Conditions and Alert Messages: (Mac OS X / Windows) section of the following document:
    iTunes: Advanced iTunes Store troubleshooting

  • Screen just keeps cycling a four-square panel in the middle for hours.  Is this normal?

    Screen just keeps cycling a four square panel in the middle for hours - is this normal?

    Hi yacht61,
    I would say that is definitely not normal! Are you having trouble logging in or converting a file?  For starters, please try the following:
    Clear the browser cache and try again.
    Try a different web browser.
    If the problem occurs when you're converting a file, try converting a different file.
    Let me know if the problem persists, and also whether it occurs when logging in or converting.
    Best,
    Sara

  • How do I change the defualt grey scrollbar and the grey movie player control panel?

    How do I change the defualt grey scroll bar sliders and the grey control panel for the movie player using Dreamweaver. Is there a way to change the color of these items using CSS?
    Any info would help.

    I have not had to write any code yet.
    Well that's going to have to change.  :-))
    For Windows Media, set the autostart  attribute value to "false"  and "0"
    http://www.mediacollege.com/video/format/windows-media/streaming/
    If you can convert your WMV and FLV files to MP4s, you'll have video that can be viewed in all modern browsers plus Smartphones.
    http://www.pickleplayer.com/index.html
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists 
    http://alt-web.com/
    http://twitter.com/altweb

  • How to place a JSlider in the middle of an image?

    Hi,
    Here is the deal. I have an image inside a JLabel. That JLabel is inside a JPanel, which in turn is encompassed by a JScrollPane. This image represents some curve or a frequency function, lets say for instance a sine curve. What I need to do is have a slider, positioned (just to keep things simple for now) in the middle of that image, not above or below or to the side of an image, but rather directly over it. Thus, blocking a small section of the image from view. So that the user can drag the mouse cursor along the (horizontal) slider and see the different values on that curve. I dont know of any LayoutManager that would allow me to place a JSlider at an arbitrary position on top of a JLabel, besides just using a Null Layout. However, when I use a Null Layout my scroll bars disappear and the JSlider itself just sits there doing nothing, without reacting to any mouse movements, and mroe importantly as soon as the application is resized, the JSlider disappears completely.
    Any comments/code snippets would be greatly appreciated.
    Thanks,
    Val

    /* From: Java Tutorial - How To Use Layered Panes
    *       LayeredPaneDemo.java
    *       http://java.sun.com/docs/books/tutorial/uiswing/
    *                                components/layeredpane.html
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.border.*;
    public class valy extends JPanel implements ChangeListener {
      private SineWave sineWave = new SineWave();
      JSlider slider;
      JLayeredPane layeredPane;
      public valy() {
        slider = new JSlider(1, 30, 5);
        slider.setBounds(50,125,300,25);
        slider.addChangeListener(this);
        layeredPane = new JLayeredPane();
        layeredPane.setPreferredSize(new Dimension(400,300));
        layeredPane.setBorder(
          BorderFactory.createTitledBorder("Layered Pane App"));
        layeredPane.add(slider, JLayeredPane.PALETTE_LAYER);
        JPanel panel = new JPanel();
        panel.add(sineWave);
        JScrollPane scrollPane = new JScrollPane(panel);
        int width = layeredPane.getPreferredSize().width;
        int height = layeredPane.getPreferredSize().height;
        scrollPane.setBounds(15, 25, width - 30, height - 40);
        layeredPane.add(scrollPane, JLayeredPane.DEFAULT_LAYER);
        add(layeredPane);
      public void stateChanged(ChangeEvent e) {
        sineWave.setCycles(
          ((JSlider)e.getSource()).getValue());
      public static void main(String[] args) {
        JFrame frame = new JFrame();
        JComponent contentPane = new valy();
        contentPane.setOpaque(true);
        frame.setContentPane(contentPane);
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.pack();
        frame.setLocation(300,200);
        frame.setVisible(true);
    /* From: Thinking in Java by Bruce Eckel
      *       3rd edition, Chapter 16
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class SineWave extends JLabel {
      private static int SCALEFACTOR = 200;
      private int cycles, points;
      private double[] sines;
      private int[] pts;
      public SineWave() {
        setCycles(5);
        setPreferredSize(new Dimension(400,400));
      public void setCycles(int newCycles) {
        cycles = newCycles;
        points = SCALEFACTOR * cycles * 2;
        sines = new double[points];
        for(int j = 0; j < points; j++) {
          double radians = (Math.PI/SCALEFACTOR) * j;
          sines[j] = Math.sin(radians);
        repaint();
      public void paintComponent(Graphics g) {
        super.paintComponent(g);
        Graphics2D g2 = (Graphics2D)g;
        g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
                            RenderingHints.VALUE_ANTIALIAS_ON);   
        int maxWidth = getWidth();
        double hstep = (double)maxWidth/(double)points;
        int maxHeight = getHeight();
        pts = new int[points];
        for(int j = 0; j < points; j++)
          pts[j] =
            (int)(sines[j] * maxHeight/2 * .95 + maxHeight/2);
        g2.setPaint(Color.red);
        for(int j = 1; j < points; j++) {
          int x1 = (int)((j - 1) * hstep);
          int x2 = (int)(j * hstep);
          int y1 = pts[j - 1];
          int y2 = pts[j];
          g2.drawLine(x1, y1, x2, y2);
    }

  • My iPad 1st gen has a large grey stripe in the middle of the screen. Any help would be appreciated

    It was not dropped and has no other damage and works fine EXCEPT i cannot view the middle part of the screen.
    From other posts and searching the web this seems to be a "KNOWN" 1st Gen issue and I am ot the only one. 
    Anyone had any luck with getting this solved ??
    My solution was I just bought a new iPad 4th Gen because I did not want to be without my favorite device but am discouraged by the fact Apple is NOT commenting on this issue or offering a fix 
    I am hoping that this 4th Gen did not come with a 2 year expiration date - for almost $800 bucks it should last until I decide - not until it is completely disabled by a manufacturer defect as in what happened with my 1st Gen
    I still expect my 1st Gen to work and need any suggestions in dealing with the issue as (OF COURSE) the device is no longer under warranty

    $100 you can buy a replacement screen => http://www.ifixit.com/iPad-Parts/iPad-Wi-Fi-Front-Panel-Assembly/IF180-000?utm_s ource=ifixit_guide&utm_medium=guide_intro&utm_content=required_items&utm_term=ip ad_wi-fi
    Then use the guide to swap out the screen => http://www.ifixit.com/Guide/Installing+iPad+Wi-Fi+Front+Panel+Assembly/4174/1
    I had a similar issue last year when I bought my new Samsung HDTV. There was a strip of discoloration going down the middle of the screen about 3 inches wide. Samsung replaced the screen as there was nothing that could be done to fix it.
    I imagine this means the crystals in the screen are somehow damaged. It may not be your fault, they could have just gone bad from bad manufacturing or whatever. There is software for desktop computers that runs through series of tests for attempting to correct issues with an LCD screen, but it would be difficult to run this software on an iPad screen. I doubt there is an app that does anything similar, but you can check the app store or the Cydia market if jailbroken.
    Good luck

  • How to align flash content to the middle of the screen in browser?

    I am currently building a website in flash cs5.5 using AS2.0. One of the pages is 1024px wide by 1536 height. I want the screen to show only the first half of the screen and then the user has to scroll down using the browser scrollbar to see the second half of the screen.
    Below is the html code. I have changed the 'overflow' from hidden to auto so that the website is scrollable. However when i preview the website in the browser, it is aligned to the left. Even though below (highlighted in red) it says 'middle'. This is not what i want, i want the website to me aligned in the middle so that there is a border on either side of the website.I have tried numerous things to fix it but all to no avail. Could someone please help. Let me know if you need anymore info.
    Thanks
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
    <head>
      <title>aboutus</title>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
      <style type="text/css" media="screen">
      html, body { height:100%; background-color: #333333;}
      body { margin:0; padding:0; overflow:auto; }
      #flashContent { width:100%; height:100%; }
      </style>
    </head>
    <body>
      <div id="flashContent">
       <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="1024" height="1536" id="aboutus" align="middle">
        <param name="movie" value="aboutus.swf" />
        <param name="quality" value="best" />
        <param name="bgcolor" value="#333333" />
        <param name="play" value="true" />
        <param name="loop" value="true" />
        <param name="wmode" value="window" />
        <param name="scale" value="showall" />
        <param name="menu" value="true" />
        <param name="devicefont" value="false" />
        <param name="salign" value="" />
        <param name="allowScriptAccess" value="sameDomain" />
        <!--[if !IE]>-->
        <object type="application/x-shockwave-flash" data="aboutus.swf" width="1024" height="1536">
         <param name="movie" value="aboutus.swf" />
         <param name="quality" value="best" />
         <param name="bgcolor" value="#333333" />
         <param name="play" value="true" />
         <param name="loop" value="true" />
         <param name="wmode" value="window" />
         <param name="scale" value="showall" />
         <param name="menu" value="true" />
         <param name="devicefont" value="false" />
         <param name="salign" value="" />
         <param name="allowScriptAccess" value="sameDomain" />
        <!--<![endif]-->
         <a href="http://www.adobe.com/go/getflash">
          <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" />
         </a>
        <!--[if !IE]>-->
        </object>
        <!--<![endif]-->
       </object>
      </div>
    </body>
    </html>

    #flashContent {    
    width: 1024px;
    margin-left: auto;
    margin-right: auto;
    Get rid of the 100% w/h and give flashContent a set width (1024).
    Then you can give the right and left an auto margin... centering the <div id="flashContent">.
    Best wishes,
    Adninjastrator

  • My ITunes won't sync my ipad and closes down in the middle. I have Windows 7 Ultimate. How do I fix this problem?

    My itunes won't sync my ipad and closes down in the middle of the attempted syn. I have windows 7 ultimate. Any ideas about what to do?

    If the steps above do not resolve the issue, attempt to sync with iTunes while logged in as a new admin user. Follow these steps to create a new administrator user within Windows:
    From the Start menu, choose Control Panel.
    Open User Accounts.
    Select Create a new account and follow the instructions to complete the account setup process.
    Once the new account is created, choose Log Off from the Start menu.
    Log in to the newly created user account.
    If the error does occur in the new user account, the issue may be caused by content downloaded or created on the device, such as podcasts and voice memos. Removing content from the device may address the issue.
    If the error does occur in the new user account, the issue may be caused by content downloaded or created on the device, such as podcasts and voice memos. Removing content from the device may address the issue.
    If these steps do not work at all, I would suggest calling AppleCare at 1-800-275-2273 (assuming your iPad is stilll within support or has an AppleCare Protection Plan) and let them know you have already tried all troubleshooting steps per TS2830.

  • Itunes 7 will not install; it hangs in the middle of "registering"

    I cannot install itunes 7. It hangs in the middle of "registering" and will not proceed any further. Can anyone please help me? I am so frustrated! Thank you very much.

    I spent 6 hours last weekend with this installation problem and came up with a process that seems to work - I've posted it a number of times and no one has said it failed for them. Lots of people have said it worked.
    First go to Control Panel, Add or Remove Programs and uninstall Quicktime and iTunes.
    Next go to the Microsoft web site below and download the Windows Installer Cleanup Utility. Install it, run it, then uninstall Quicktime and iTunes with it, if they appear in the list.
    http://support.microsoft.com/default.aspx?scid=kb;en-us;290301
    Go to apple.com and download the iTunes setup to your hard drive.
    It doesn't hurt to disable or pause your virus scanner before installing, just remember to enable it again when you're done.
    Try installing iTunes. You might still have problems installing iTunes because of QuickTime registry key access errors. If that happens, go to the link below, scroll about half way down and CAREFULLY follow the steps to change both Owner and Permissions on the keys that fail.
    http://discussions.apple.com/thread.jspa?threadID=688433&tstart=0
    NEVER DELETE REGISTRY KEYS MANUALLY USING REGEDIT!
    If this doesn't work, please re-post your problems. The more information we have to work with, the better we can understand the flawed installation process apple uses for iTunes and Quicktime and we can come up with solutions. It seems that the install problems are really with Quicktime rather than iTunes.

  • My mac is coming up with a white page with a picture of a file in the middle with a ? mark in and keeps flashing nothing will work ?

    Hi
    My daughter has a apple mac laptop.  It is coming up with a white page with a file picture with a ? mark in the middle of it.  It keeps flashing.  Nothing will work now and we car'nt seem to work it out.  Does anyone have any answers ?

    That folder with the question mark icon means that the MacBook can't find the boot directory. That can either mean it can't find the hard drive or the Operating System data on the hard drive is somehow corrupted.
    Put your install DVD into the optical drive and reboot. As soon as you hear the boot chime, hold down the "c" key on your keyboard (or the Option key until the Install Disk shows up). That will force your MacBook to boot from the install DVD in the optical drive.
    When it does start up, you'll see a panel asking you to choose your language. Just press the Return key on your keyboard once. It will then present you with an Installation window. Completely ignore this window and click on Utilities in the top menu and scroll down to Disk Utility and click it. When it comes up is your Hard Drive in the list on the left?
    If it is then click on the Mac OS partition of your hard drive in the left hand list. Then select the First Aid Tab and run Repair Disk. The Repair Disk button won't be available until you've clicked on the Mac OS partition on your hard drive. If that repairs any problems run it again until the green OK appears and then run Repair Permissions.
    If your hard drive isn’t recognized in Disk Utility then your hard drive is probably dead.

  • Where is the "Scrollable Frame" on the Overlay Creator panel?

    I can't seem to find the "Scrollable Frame" on my Overlay Creator panel and now I'm caught in the middle. Is there anything that I missed? I can only see the following:
    Hyperlink
    Slideshow
    Image Sequence
    Audio & Video
    Panorama
    Web Content
    Pan & Zoom.

    I know you mean the other Bob, but the purpose of that is to have something to align with the edge of the scrollable content.
    Without the dummy content you wouldn’t be able to position the content. Try doing it without that and you’ll see the problem.
    Bob

Maybe you are looking for