JTable in JScrollPane auto resize refresh problem

Hello,
I have a JTable in a JScrollPane. Number of rows is changing.
I'm using the following to auto-resize JScrollPane.
public Dimension getPreferredSize() {
              Dimension size = super.getPreferredSize();
              size.height -= getViewport().getPreferredSize().height;
              Component view = getViewport().getView();
              if(view != null)
              size.height += view.getPreferredSize().height;
              return size;
         }There is a JButton, which adds an empty row to the JTable. It all works fine, except the auto-resize when a new row is added. I want all rows of JTable to be visible, with no scrollbars present. I tried repaint(), revalidate(), addNotify(). What should I do?
Thanks.

Sure
DefaultTableModel dtm = new DefaultTableModel(vec, header);
          jt0 = new JTable(dtm);
          jt0.getTableHeader().setReorderingAllowed(false);
          jt0.setFont(new Font("Tahoma", Font.PLAIN, 12));
          jt0.getTableHeader().setFont(new java.awt.Font("Tahoma", java.awt.Font.BOLD, 12));
          jt0.setRowHeight(18);
        jt0.setPreferredScrollableViewportSize(new Dimension(500, jt0.getRowCount() * jt0.getRowHeight()));
        jt0.setFillsViewportHeight(false);
          jsp0 = new JScrollPane(jt0);
GridBagConstraints gbc = new GridBagConstraints(); 
        gbc.insets = new Insets(2,1,2,1); 
        gbc.weightx = 1.0; 
        gbc.weighty = 1.0; 
        JPanel p0 = new JPanel(new GridBagLayout()); 
        gbc.fill = gbc.HORIZONTAL;
        p0.add(jsp0, gbc);
          JButton jb1 = new JButton("add row");
          jb1.setSize(40, 18);
jb1.addActionListener(new java.awt.event.ActionListener() {
               public void actionPerformed(java.awt.event.ActionEvent e) {
                    dtm.addRow(new Object[]{....});
//                    jt0.scrollRectToVisible(jt0.getCellRect(jt0.getModel().getRowCount()-1, 1, false));
//                    jt0.setRowSelectionInterval(jt0.getModel().getRowCount()-1, jt0.getModel().getRowCount()-1);
    public class SizeX extends JScrollPane {
         public Dimension getPreferredSize() {
              Dimension size = super.getPreferredSize();
              size.height -= getViewport().getPreferredSize().height;
              Component view = getViewport().getView();
              if(view != null)
              size.height += view.getPreferredSize().height;
              return size;
    }

Similar Messages

  • JScrollPane visible part refresh rate problem

    I am writing an application that reads image and displays it in a JScrollPane via JPanel. It also has JSlider to set displayed image focus. The problem is that sometimes when big image is loaded and user changes seen part via scrollbars, the JScollPane refresh takes about 10 sec. The question is: How to make JScrollPane's content refresh/repaint only the part that is visible. The code is:
    import java.awt.image.BufferedImage;
    import java.io.*;
    import javax.imageio.ImageIO;
    import javax.swing.*;
    import java.awt.*;
    import javax.swing.event.*;
    public class Main extends JFrame{
        private BufferedImage image;
        private JScrollPane sPane;
        private ImagePanel iPanel;
        private JSlider slider;
        private Container contentPane;
        public Main() {
            try {
                image = ImageIO.read(new File("c:\\pict\\img.JPG"));
            } catch (IOException ioe){
                ioe.printStackTrace();
                System.exit(1);
            slider = new JSlider(JSlider.HORIZONTAL,1,3,1);
            slider.setMinorTickSpacing(1);
            slider.setMajorTickSpacing(1);
            slider.setSnapToTicks(true);
            slider.addChangeListener(new ChangeListener() {
                public void stateChanged(ChangeEvent e) {
                    iPanel.setImageFocus(slider.getValue());
                    invalidate();
            iPanel = new ImagePanel(image);
            sPane = new JScrollPane(iPanel,
                    JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,
                    JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
            contentPane = this.getContentPane();
            contentPane.add(slider,BorderLayout.NORTH);
            contentPane.add(sPane,BorderLayout.CENTER);
            setExtendedState(JFrame.MAXIMIZED_BOTH);
            setDefaultCloseOperation(3);
        public static void main(String[] args) {
            SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    new Main().setVisible(true);
    class ImagePanel extends JPanel{
        private Image img;
        private Dimension imageSize;
        public ImagePanel(Image img){
            this.img = img;
            imageSize = new Dimension(img.getWidth(null),img.getHeight(null));
        public void setImage(Image img){
            this.img = img;
        public void setImageFocus(int focus){
            if (this!=null){
                getGraphics().clearRect(0,0,imageSize.width,imageSize.height);
            switch (focus){
                case 1:
                    imageSize = new Dimension(img.getWidth(null),img.getHeight(null));
                    break;
                case 2:
                    imageSize = new Dimension(2*img.getWidth(null),2*img.getHeight(null));
                    break;
                case 3:
                    imageSize = new Dimension(3*img.getWidth(null),3*img.getHeight(null));
                    break;
                default:
                    imageSize = new Dimension(0,0);
            setSize(imageSize);
            setPreferredSize(imageSize);
            repaint();
            ((JScrollPane)getParent().getParent()).revalidate();
        public void paintComponent(Graphics g){
            JScrollPane sp = (JScrollPane)getParent().getParent();
            g.clearRect(sp.getX(),sp.getY(),sp.getWidth(),sp.getHeight());
            g.drawImage(img,0,0,imageSize.width,imageSize.height,null);
    }Thanks,

    Sure
    DefaultTableModel dtm = new DefaultTableModel(vec, header);
              jt0 = new JTable(dtm);
              jt0.getTableHeader().setReorderingAllowed(false);
              jt0.setFont(new Font("Tahoma", Font.PLAIN, 12));
              jt0.getTableHeader().setFont(new java.awt.Font("Tahoma", java.awt.Font.BOLD, 12));
              jt0.setRowHeight(18);
            jt0.setPreferredScrollableViewportSize(new Dimension(500, jt0.getRowCount() * jt0.getRowHeight()));
            jt0.setFillsViewportHeight(false);
              jsp0 = new JScrollPane(jt0);
    GridBagConstraints gbc = new GridBagConstraints(); 
            gbc.insets = new Insets(2,1,2,1); 
            gbc.weightx = 1.0; 
            gbc.weighty = 1.0; 
            JPanel p0 = new JPanel(new GridBagLayout()); 
            gbc.fill = gbc.HORIZONTAL;
            p0.add(jsp0, gbc);
              JButton jb1 = new JButton("add row");
              jb1.setSize(40, 18);
    jb1.addActionListener(new java.awt.event.ActionListener() {
                   public void actionPerformed(java.awt.event.ActionEvent e) {
                        dtm.addRow(new Object[]{....});
    //                    jt0.scrollRectToVisible(jt0.getCellRect(jt0.getModel().getRowCount()-1, 1, false));
    //                    jt0.setRowSelectionInterval(jt0.getModel().getRowCount()-1, jt0.getModel().getRowCount()-1);
        public class SizeX extends JScrollPane {
             public Dimension getPreferredSize() {
                  Dimension size = super.getPreferredSize();
                  size.height -= getViewport().getPreferredSize().height;
                  Component view = getViewport().getView();
                  if(view != null)
                  size.height += view.getPreferredSize().height;
                  return size;
        }

  • JTable Refreshing problem for continuous data from socket

    Hi there,
    I am facing table refreshing problem. My table is filled with the data received from socket . The socket is receiving live data continuously. When ever data received by client socket, it notify table model to parse and refresh the data on specific row. The logic is working fine and data is refresh some time twice or some thrice, but then it seem like java table GUI is not refreshing. The data on client socket is continuously receiving but there is no refresh on table. I am confident on logic just because when ever I stop sending data from server, then client GUI refreshing it self with the data it received previous and buffered it.
    I have applied all the available solutions:
    i.e.
         - Used DefaultTableModel Class.
         - Created my own custem model class extend by AbstractTableModel.
         - Used SwingUtilities invokeLater and invokeAndWait methods.
         - Yield Stream Reader thread so, that GUI get time to refresh.
    Please if any one has any idea/solution for this issue, help me out.
    Here is the code.
    Custom Data Model Class
    package clients.tcp;
    import java.util.*;
    import javax.swing.table.*;
    import javax.swing.*;
    public class CustomModel extends DefaultTableModel implements Observer {
    /** Creates a new instance of CustomModel */
    public CustomModel() {
    //super(columnNames,25);
    String[] columnNames = {"Sno.","Symbol","BVol","Buy","Sale",
    "SVol","Last","..","...","Total Vol...",
    "..","High","..","Low","Change","Average","..."};
    super.setColumnIdentifiers(columnNames);
    super.setRowCount(25);
    /*This method called by client socket when ever it recived data as line/record*/
    public synchronized void update(Observable o, Object arg){
    collectData(arg.toString());
    /*This method used to parse, collect and notify table for new data arrival*/
    public synchronized void collectData(String rec){              
    String validSymbol="";
    System.out.println("collectDataRecord :-"+rec);
    StringTokenizer recToken=new StringTokenizer(rec," ");
    Vector rowVector=new Vector();
    for(int i=0;i<25;i++){
    validSymbol=(String)getValueAt(0,1);
    if(rec.indexOf(validSymbol) != -1){
    for(int j=0;recToken.hasMoreTokens();j++){
    super.setValueAt(recToken.nextToken(),i,j);
    //break;
    Client Socket Class
    package clients.tcp;
    import java.io.*;
    import java.net.*;
    import java.util.*;
    import javax.swing.*;
    public class DataReceiver extends Observable implements Runnable{
    private Socket TCPConnection = null;
    private BufferedReader br = null;
    private String serverName = "Salahuddin";
    private int serverPort = 5555;
    public DataReceiver()
    public void setServerName(String name){
    this.serverName=name;
    public void setServerPort(int port){
    this.serverPort=port;
    //03-20-04 12:30pm Method to open TCP/IP connection
    public void openTCPConnection()
    try
    TCPConnection = new Socket(serverName, serverPort);
    br = new BufferedReader(new InputStreamReader(
    TCPConnection.getInputStream()));           
    System.out.println("Connection open now....");
    //System.out.println("value is: "+br.readLine());
    }catch (UnknownHostException e){
    System.err.println("Don't know about host: ");
    }catch (IOException e){
    System.err.println("Couldn't get I/O for "
    + "the connection to: ");
    //03-20-04 12:30pm Method to receive the records
    public String receiveData(){
    String rec = null;
    try
    rec = br.readLine();          
    catch(IOException ioe)
    System.out.println("Error is: "+ioe);
    ioe.printStackTrace(System.out);
    catch(Exception ex)
    System.out.println("Exception is: "+ex);
    ex.printStackTrace(System.out);
    return rec;     
    public void run()
    while(true)
    String str=null;
    str = receiveData();
    if(str != null)
    /*try{
    final String finalstr=str;
    Runnable updateTables = new Runnable() {
    public void run() { */
    notifyAllObservers(str);
    SwingUtilities.invokeAndWait(updateTables);
    }catch(Exception ex){
    ex.printStackTrace(System.out);
    System.out.println("Observer Notified...");*/
    try{
    Thread.sleep(200);
    }catch(Exception e){
    public synchronized void notifyAllObservers(String str){
    try{
    setChanged();
    notifyObservers(str);
    }catch(Exception e){
    e.printStackTrace(System.out);
    Regards,
    Salahuddin Munshi.

    use your code to post codes more easy to read, lyke this:
    package clients.tcp;
    import java.util.*;
    import javax.swing.table.*;
    import javax.swing.*;
    public class CustomModel extends DefaultTableModel implements Observer {
    /** Creates a new instance of CustomModel */
    public CustomModel() {
    //super(columnNames,25);
    String[] columnNames = {"Sno.","Symbol","BVol","Buy","Sale",
    "SVol","Last","..","...","Total Vol...",
    "..","High","..","Low","Change","Average","..."};
    super.setColumnIdentifiers(columnNames);
    super.setRowCount(25);
    /*This method called by client socket when ever it recived data as line/record*/
    public synchronized void update(Observable o, Object arg){
    collectData(arg.toString());
    /*This method used to parse, collect and notify table for new data arrival*/
    public synchronized void collectData(String rec){
    String validSymbol="";
    System.out.println("collectDataRecord :-"+rec);
    StringTokenizer recToken=new StringTokenizer(rec," ");
    Vector rowVector=new Vector();
    for(int i=0;i<25;i++){
    validSymbol=(String)getValueAt(0,1);
    if(rec.indexOf(validSymbol) != -1){
    for(int j=0;recToken.hasMoreTokens();j++){
    super.setValueAt(recToken.nextToken(),i,j);
    //break;
    Client Socket Class

  • JTable without JScrollPane behavior crippled

    I want column width of JTable t1 goes parallel with the width resizing on
    JTable t2. If tables are put in JScrollPanes, this has no problem. But if I put
    those tables in simpler container, which is JPanel in this case, t2 shows a
    funny behavior -- with user's mouse operation on t2 column, their width
    never changes but t1 column width changes properly. Could I have
    succeeded in communicating the funniness with these sentences?
    Please try this code and give cause and solution if you could:
    import java.awt.*;
    import java.beans.*;
    import java.util.*;
    import javax.swing.*;
    import javax.swing.table.*;
    import javax.swing.event.*;
    public class TableColumnWidthResize{
      JFrame frame;
      JTable t1, t2;
      TableColumnModel tcm1, tcm2;
      Enumeration columns1, columns2;
      String[] t1h = {"Road", "Length", "City"};
      String[][] t1c
       = {{"NW2", "800", "Dora"},
         {"Iban", "600", "Weiho"},
         {"ENE2", "500","Porso"}};
      String[] t2h = {"Flower", "Curse", "Priest"};
      String[][] t2c
        = {{"Fang", "7.00", "EggChar"},
          {"Shaoma", "5.00", "ScaCra"},
          {"Jiao", "4.00", "PorCabb"}};
      public TableColumnWidthResize(){
        frame = new JFrame();
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        Container con = frame.getContentPane();
        con.setLayout(new GridLayout(2, 1));
        t1 = new JTable(t1c, t1h); //target table -- 'resized from t2'
        t2 = new JTable(t2c, t2h); //source table -- 'initiate resize'
        t1.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
        t2.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
        /* you can compare two methods of table placement*/
        useScrollPane(t1, t2, con); //works fine
    //    nouseScrollPane(t1, t2, con); //resize behavior weird
        frame.pack();
        frame.setVisible(true);
        tcm1 = t1.getColumnModel();
        tcm2 = t2.getColumnModel();
        columns2 = tcm2.getColumns(); // all columns of t2
        TableColumnListener tcl = new TableColumnListener();
        while (columns2.hasMoreElements()){
          TableColumn tc = (TableColumn)(columns2.nextElement());
          tc.addPropertyChangeListener(tcl);
      class TableColumnListener implements PropertyChangeListener{
        // achieve 'interlocking-column-resizing' from t2 to t1
        public void propertyChange(PropertyChangeEvent pce){
          TableColumn tc = (TableColumn)(pce.getSource());
          int i = tc.getModelIndex();
          tcm1.getColumn(i).setPreferredWidth(tc.getWidth());
      void useScrollPane(JTable ta, JTable tb, Container c){
        JScrollPane jsc1 = new JScrollPane(ta);
        ta.setPreferredScrollableViewportSize(new Dimension(225, 50));
        JScrollPane jsc2 = new JScrollPane(tb);
        tb.setPreferredScrollableViewportSize(new Dimension(225, 50));
        c.add(jsc1); c.add(jsc2);
      void nouseScrollPane(JTable ta, JTable tb, Container c){
        JPanel p1 = new JPanel(); JPanel p2 = new JPanel();
        p1.setLayout(new BorderLayout());
        p2.setLayout(new BorderLayout());
        p1.add(ta.getTableHeader(), BorderLayout.PAGE_START);
        p2.add(tb.getTableHeader(), BorderLayout.PAGE_START);
        p1.add(ta, BorderLayout.CENTER);
        p2.add(tb, BorderLayout.CENTER);   
        c.add(p1); c.add(p2);
      public static void main(String[] args){
        new TableColumnWidthResize();
    }

    Hey hiwa,
    I don't see anything mysterious going on. If you think about it, how many components can we resize at run-time/dynamically with a mouse - none, except for the columns in a JTable, Frames and Dialogs. Note the latter two are top level and answer to no-one (except the screen i guess).
    If you have ever implemented a component that can be 'dragged' and manipulated by the mouse, have you ever done so outside, that is, not using a JScrollPane? I doubt it.
    I do not think it has anything to do with mouse precision. Maybe you are just experiencing undefined behaviour, unreliable behaviour. I imagine the Swing team didn't bother themselves with a usage scenario that would yield lesser results for a simple task. Using AUTO_RESIZE_OFF and requesting more room than the Container has to offer may upset that containers LayoutManager i.e. their algorithms may contain code that will shrink child components to fit, or nab space from sibling components.
    Basically, in my experience, how ever long it takes me to realise it, when Swing goes on the blink it is usually a programming error.
    BTW, did my suggestion work ok?
    Sorry if I come across forceful. I'm glad I read and tested your code - the synchronization effect will be very useful.
    Warm regards,
    Darren

  • Auto-resizing all components

    Is there a method that auto resizes all components on a JFrame when it is maximised for example. I have got a JTable (in a scrollpane) and some other components on a panel. I have sized the frame to be approx 80% of the screen size. When the frame is maximised, the table and the other components retain their original size (understandably so!). Is there a method available that can resize the panel and its components to resize accordingly when the frame is maximised?...I know I can add the componentListener and implement a method in the componentResized() method...but I dont want to duplicate stuff that's already available. Thanx for your help.

    I don't know the specific needs.
    BorderLayout: simple Layout; Components are oriented NORTH, EAST, SOUTH, WEST
    FlowLayout: all components are added after the other
    GridLayout: components are oriented in a grid
    GridBagLayout: complex once
    See the Java Tutorial for more information.

  • G5 quad gf6600 refresh problems

    I have refresh problems (never had it with 2.5 bipro)
    in photoshop the layers do weird things and leaves traces.
    in lightwave if i select a point op poligon, nothing seems to happen, only when i resize the view it refreshes.
    lightwave is freshly installed, ph is a port from the old mac

    upgraded programs

  • Need debugging help: Why is JScrollPane auto-scrolling?

    I'm trying to figure out why when I double-click on a cell within a JTable that's wrapped in a JScrollPane in order to open up another window, the JScrollPane automatically scrolls to the top.
    Even when I update the double click operation to simply call setSelected(false), the JScrollPane still automatically scrolls to the top.
    I added myself as a change listener to the scroll pane's row header view port, and captured the following stack trace.
    I'm having trouble debugging exactly what is causing the following chain of events to fire. If I try to put a debug breakpoint on a method like EventQueue.invokeLater() that's probably initiating the following chain of events, I can't even get back to my application window from my IDE without having to dismiss all of the breakpoints that are reached.
    If I try to follow through from the double-click to the actual JScrollPane auto-scroll, I get lost in a maze of Swing events that I can't navigate out of.
    Any suggestions on how to appropriately debug this would be greatly appreciated.
    Thanks,
    Mike
    rowHeaderViewPort stateChanged fired
    chgEvent == javax.swing.event.ChangeEvent[source=javax.swing.JViewport[,1,21,0x329,invalid,layout=javax.swing.ViewportLayout,alignmentX=null,alignmentY=null,border=,flags=8,maximumSize=,minimumSize=,preferredSize=java.awt.Dimension[width=0,height=0],isViewSizeSet=false,lastPaintPosition=,scrollUnderway=false]]
    chgEvent source == javax.swing.JViewport[,1,21,0x329,invalid,layout=javax.swing.ViewportLayout,alignmentX=null,alignmentY=null,border=,flags=8,maximumSize=,minimumSize=,preferredSize=java.awt.Dimension[width=0,height=0],isViewSizeSet=false,lastPaintPosition=,scrollUnderway=false]
    java.lang.Exception: stack trace
         at MyForm$2.stateChanged(MyForm.java:192)
         at javax.swing.JViewport.fireStateChanged(JViewport.java:1341)
         at javax.swing.JViewport.setViewPosition(JViewport.java:1096)
         at javax.swing.ViewportLayout.layoutContainer(ViewportLayout.java:179)
         at java.awt.Container.layout(Container.java:1020)
         at java.awt.Container.doLayout(Container.java:1010)
         at java.awt.Container.validateTree(Container.java:1092)
         at java.awt.Container.validateTree(Container.java:1099)
         at java.awt.Container.validateTree(Container.java:1099)
         at java.awt.Container.validateTree(Container.java:1099)
         at java.awt.Container.validateTree(Container.java:1099)
         at java.awt.Container.validateTree(Container.java:1099)
         at java.awt.Container.validateTree(Container.java:1099)
         at java.awt.Container.validateTree(Container.java:1099)
         at java.awt.Container.validate(Container.java:1067)
         at javax.swing.RepaintManager.validateInvalidComponents(RepaintManager.java:353)
         at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:116)
         at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:454)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)

    Thanks for your response. I examined the code and nowhere that I can see is it calling either of those two methods.
    At some point, it looks like something within my code or in the UI frameworks that I'm using is invalidating my JScrollPane. I'm having a very difficult time, though, tracking down exactly which component is causing that invalidation.
    Short of writing my own JScrollPane so that I can capture the stack trace of calls to invalidate(), does anyone have any suggestions for debugging this further? I tried to use a conditional breakpoint in Eclipse 2.1.3 (Component.invalidate() where the Component is an instance of JScrollPane), but my breakpoint is never being executed.
    Thanks,
    Mike

  • How do I turn off "image auto-resizing"?

    After upgrading to version 3.6.3, the browser is now auto-scaling my images. I turned off "auto-resizing" on the About:Config page (in other words, setting that parameter to "false") but Firefox is still auto-scaling my images. How can I prevent this?
    == This happened ==
    Every time Firefox opened
    == I upgraded to version 3.6.3

    If you have set the pref '''browser.enable_automatic_image_resizing''' to ''false'' on the '''about:config''' page then Firefox shouldn't resize images.
    Start Firefox in [[Safe Mode]] to check if one of your add-ons is causing your problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    See [[Troubleshooting extensions and themes]] and [[Troubleshooting plugins]]
    Reset the page zoom on pages that cause problems: '''View > Zoom > Reset''' (Ctrl+0 (zero); Cmd+0 on Mac)
    See [[Text Zoom]] and [[Page Zoom]] and http://kb.mozillazine.org/Zoom_text_of_web_pages
    .

  • Auto resize width height in TextFlow controller

    HI,
    We are facing the problem in auto resize width height in TextFlow controller. Content is overlaping withing the controller or sometimes it's seems like not full containt displaying on the control.
    We are writing the below code in the flashx.textLayout.events.CompositionCompleteEvent listiner to orgnize the above step:
         var controller:ContainerController = new ContainerController();
         textFlow.flowComposer.composeToPosition();
         var contentBounds:Rectangle = _controller.getContentBounds();
       _controller.setCompositionSize(_controller.compositionWidth, contentBounds.height);
       textFlow.flowComposer.addController(_controller);
       textFlow.flowComposer.updateAllControllers();
    Please correct if are missing any steps above.
    Regards,
    R.BS

    Hi,
    I have got the solution on my last query. Below is the code to get rid of the content display and auto adjust the width & height of the controller:
    var textHeight:int = Math.ceil(_controller.getContentBounds().height);
       if (textHeight > _controller.compositionHeight) {
         TextDataHeight = textHeight + 12;
                   _controller.setCompositionSize(TextDataWidth ,TextDataHeight);
                   textFlow.flowComposer.updateAllControllers();
    I have also set the TextDataHeight = 50 to display complete paragraph text.
    Due to this I have one problem arise that is indentation of the paragraph content or bulleted text on my content.
    Is any one have the solution on this?
    Looking forward for your response.
    Regards,
    R.BS

  • My images will not auto resize for viewing

    This is somewhat embarrassing. When viewing images from the web, if they're too large to fit the current window, they get re-sized to fit. Okay. I have a file/page of thumbnails generated by XnView and when I click, the image is loaded, everything is good except the image is always larger than the window. The problem is Firefox WILL NOT auto-resize the image to fit. If I right mouse, I can select "View Image" to view whole image, but I don't want to have to do that for 1000's of images.
    Any help/insight would be appreciated.
    Regards,
    Dave

    Lilly.Love wrote:
    Hi, I'm new to this and for some reason my images are not appearing to full scale on adobe premiere cs6. This is really annoying as I am trying to make a stop motion video but I can't see what I'm doing. Please reply soon, this is an important project. Thanks
    Your sequence settings and clip settings are not matching. To make them match, right click on a clip and choose New Sequence from Clip and a new sequence will be created based on your clip settings.

  • Auto resizing tables for screen resolution

    Hi everyone.
    Im currently working on my website using dreamweaver, and i
    just stumbled across a problem. Im building my website for screen
    resolution 1020x768. However, alot of people tend to use 1280x1024
    nowadays. The problem is that images get all screwed up at
    different screen resolutions.
    The best way to fix this would be auto resizing tables (so a
    1280 using can view my 1024 website without any problems). But, i
    have no idea how to create this. Ive been trying dreamweavers help,
    but that didnt help me.
    So i was wondering if anyone around here has the solution for
    my problem.
    Thanks in advance!

    Hi everyone.
    Im currently working on my website using dreamweaver, and i
    just stumbled across a problem. Im building my website for screen
    resolution 1020x768. However, alot of people tend to use 1280x1024
    nowadays. The problem is that images get all screwed up at
    different screen resolutions.
    The best way to fix this would be auto resizing tables (so a
    1280 using can view my 1024 website without any problems). But, i
    have no idea how to create this. Ive been trying dreamweavers help,
    but that didnt help me.
    So i was wondering if anyone around here has the solution for
    my problem.
    Thanks in advance!

  • How can I set auto-resize for an application?

    Hi, I have created a flex application but now I have a problem: if I use it on a netbook, with little display, or I use it throught facebook the application does not auto-resize nor vertical/horizontal bar appear!
    Is there a way to let application auto-resize?I used flash builder 4 with a graphite-spark theme and no layout at all...help me please!

    Yes, but the problem are x and y : they are absolute so containers will eventually collide...you mean the only way is to use nested containers and not use coordinates in order to put elements on the application?

  • Stop auto resize on mplayer? [solved]

    Hi does anyone know how to stop mplayer from auto resizing when you load a video??
    I have searched everywhere and i am suprised it's not an option in preferences
    Cheers
    Last edited by joco2 (2007-08-12 12:07:25)

    I am pretty sure mplayer resizes itself in order to have one monitor pixel per one movie pixel in one dimension and the other dimension is calculated differently if the movie uses non square pixels (like DVDs).
    About your problem, try reading -vf scale in mplayer man.

  • How to disable auto resizing for jComboBox

    Hi,
    I do not know how to prevent jComboBox to be auto resized according to its content. I put a jComboBox on JPanel with IDE.
    After that I use for loop to fill a jComboBox. JComboBox width depends on the content and jComboBox is autoresized. I tried to use set*Size before and after for loop but it did not work as I wish:
            jComboBoxT.setMaximumSize(new java.awt.Dimension(10, 20));
            jComboBoxT.setMinimumSize(new java.awt.Dimension(10, 20));
            jComboBoxT.setPreferredSize(new java.awt.Dimension(10, 20));
            jComboBoxT.setSize(new java.awt.Dimension(10, 20));Could you help me please? The problem is that I have three jComboBox in one row and after autoresizing one disappears...
    Best regards,
    Primoz

    Hi,
    I have created SSCCE. I do not like that jComboBox spread over the whole display. I would like that the jComboBox width is only about 2 inches (5cm). If you run example below you will see that jComboBox width auto resize.
    Regards,
    Primoz
    import java.awt.*;
    import javax.swing.*;
    public class PrimozComboBox extends JPanel {
        JLabel picture;
        public PrimozComboBox() {
            String[] petStrings = { "Bird", "Cat", "Dog", "Rabbit", "Pig" };
            String[] cityStrings = { "New York", "Ljubljana", "Chicago" };
            JComboBox petList = new JComboBox(petStrings);
            petList.addItem("This is very long pet name, which could spread over many lines");
            add(petList);
            JComboBox cityList = new JComboBox(cityStrings);     
            cityList.addItem("This is very long city name, which could spread over many lines");
            add(cityList);
        private static void createAndShowGUI() {
            //Create and set up the window.
            JFrame frame = new JFrame("ComboBoxDemo");
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            //Create and set up the content pane.
            JComponent newContentPane = new PrimozComboBox();
            newContentPane.setOpaque(true); //content panes must be opaque
            frame.setContentPane(newContentPane);
            //Display the window.
            frame.pack();
            frame.setVisible(true);
        public static void main(String[] args) {
            //Schedule a job for the event-dispatching thread:
            //creating and showing this application's GUI.
            javax.swing.SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    createAndShowGUI();
    }

  • Animated gif and page refresh problem

    Animated gif and page refresh problem
    Hi There,
    I'm trying to build a simple "Please wait......" screen using jsp and javascript.
    So far all is going well except that my animatate gif keeps refreshing everything the page is refresh.
    Is there a way the i can prevent the body of the page from refreshing?
    below is my sample code:
    <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
    <jsp:useBean id="StatusBean" class="com1.CandidateRelease" scope="session"/>
    <html>
    <script LANGUAGE="JavaScript">
    function refresh()
    <% if (StatusBean.isRunning()) { %>     
         //setTimeout("refresh()", 1000);
         setTimeout("location='status.jsf'", 1000);
    <% }else{%>
         window.location= "busStopAdmin.jsf";
    <%} %>
    </script>
    <head>
         <script LANGUAGE="JavaScript">     
              refresh();
         </script>     
    </head>
    <body>
         <img id="myImage" src="../img/ojp_wait.gif" alt="" width="151" height="36">
    </body>
    </html>

    Animated gif and page refresh problem
    Hi There,
    I'm trying to build a simple "Please wait......" screen using jsp and javascript.
    So far all is going well except that my animatate gif keeps refreshing everything the page is refresh.
    Is there a way the i can prevent the body of the page from refreshing?
    below is my sample code:
    <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
    <jsp:useBean id="StatusBean" class="com1.CandidateRelease" scope="session"/>
    <html>
    <script LANGUAGE="JavaScript">
    function refresh()
    <% if (StatusBean.isRunning()) { %>     
         //setTimeout("refresh()", 1000);
         setTimeout("location='status.jsf'", 1000);
    <% }else{%>
         window.location= "busStopAdmin.jsf";
    <%} %>
    </script>
    <head>
         <script LANGUAGE="JavaScript">     
              refresh();
         </script>     
    </head>
    <body>
         <img id="myImage" src="../img/ojp_wait.gif" alt="" width="151" height="36">
    </body>
    </html>

Maybe you are looking for