Resizing ScrollPane and Dimension dynamically

I am currently making a scrollbar program using ScrollPane and Dimension. I have to use those classes.
When I click "ok" button, that calls dc.enlarge(500,800) method. But it doesn't work.
When it is clicked, Dimension object should be changed and the panel has to show Horizotal
and Vertical scrollbar according to the width and height parameters.
Of course, the size will be calculated by the String contents object's rows and width. But it does not work.
How to resize the Dimension and How to display the Horizontal, Vertical scrollbar accoring to dc.enlarge's parameters?
Plz... help me...
-------------- ScrollerTest.java -----------------------------------------------
import java.awt.*;
import java.applet.Applet;
public class ScrollerTest extends Applet {
   public Scroller sc = null;
    public void init() {
        sc = new Scroller(700,250);
        sc.setVisible(true);
     add(sc);         
}-------------- Scroller.java -----------------------------------------------
import java.awt.*;
import java.awt.Window;
import java.applet.Applet;
import java.awt.event.*;
public class Scroller extends Panel implements  ActionListener {
    private Button btOk;   
    private int width = 0;
    private int height = 0;   
    private DrawCanvas dc;   
    public Scroller(int width, int height){   
        this.width = width;
        this.height = height;   
        dc = new DrawCanvas(width, height);
        setNewsContents();                           
    private void setNewsContents() {
        setLayout(new BorderLayout());
        ScrollPane scroller = new ScrollPane(ScrollPane.SCROLLBARS_AS_NEEDED);       
        scroller.add(dc);
        Adjustable vadjust = scroller.getVAdjustable();
        Adjustable hadjust = scroller.getHAdjustable();
        hadjust.setUnitIncrement(10);
        vadjust.setUnitIncrement(10);
        scroller.setSize(615     , 272);
        btOk = new Button("ok");
        btOk.addActionListener(this);
        add("Center", scroller);
        add("South", btOk);       
    public void actionPerformed(ActionEvent event) {
        if(event.getSource()==btOk) {
            dc.enlarge(500,800);
            dc.validate();
}    -------------- DrawCanvas.java -----------------------------------------------
import java.awt.*;
class DrawCanvas extends Component {
    private int width = 0;
    private int height = 0;
    private Dimension d;
    public DrawCanvas(int width, int height) {
        this.width = width;
        this.height = height;
   Dimension theSize = new Dimension(300, 200);   
   public Dimension getPreferredSize() {
        return new Dimension(width,height);               
   public void enlarge(int width, int height) {       
        theSize.width =  width;
        theSize.height = height;
        setSize(theSize);       
    public void update(Graphics g) {
        paint(g);
    public void paint(Graphics g) {       
        Rectangle r = getBounds();       
        String contents[] = {
        "addition to its usual stable of Clydesdale horses, the company will also enlist help this year ",
        "from racing star Dale Earnhardt Jr., some beer-thieving crabs and a scary hitchhiker.",       
        "The Super Bowl represents an enormous commitment for Budweiser. Bob Lachky, chief creative" ,
        "officer of Anheuser-Busch, said the St. Louis-based brewer has been advertising on the game since 1976 and has been the exclusive alcoholic beverage sponsor since 1989",
        "since 1976 and has been the exclusive alcoholic beverage sponsor since 1989, an arrangement that runs through 2012.",
        "It's important to us because it kicks off our selling season, it's the best platform",
        "possible to launch new ideas or to sustain existing campaigns, and it's absolutely the most efficient way to reach the most  it's absolutely the most efficient way to reach the most",
        "adult consumers in one sitting,",
        "Despite the rise of cable, the Internet other media to compete with broadcast television iewers and enticing a huge array of marketers ",
        ", the Super Bowl remains the most-viewed media event all year, drawing in some 90 million ",
        "viewers and enticing a huge array of marketers to pony up the big bucks for an ad",
        ", the price of which is running as high as $2.6 million for this year's broadcast",
        "on CBS Corp.'s CBS network, up slightly from about a top price of about $2.5 million last year.",
        "Comedian Carlos Mencia, of the Comedy Central show  gets ",
        "a big break with a spot set in a classroom. Lachky predicts that Mencia will get an enormous boost Lachky predicts that Mencia will get an enormous boost ",
        "following the appearance, which similarly did wonders for Cedric the Entertainer.",
        "And what would Budweiser Super Bowl ads be without some animated critters? This year, a ga",
        "ng of mischievous red crabs turn up on a beach to carry off a cooler full of beers. As in past years, Bud is keeping many ",
        g.setColor(new Color(226,250,255));
        g.fillRect(0, 0, r.width, r.height);
        g.setColor(new Color(233,231,224));            
        int line = 35;
        int line_1 = 39;
        for (int i = 0; i < contents.length; i++) {       
             g.setColor(Color.BLACK);
             g.drawString(contents, 5,line);
     g.setColor(new Color(233,231,224));
     g.drawLine(0,line_1,605,line_1);
     line += 20;
     line_1 += 20;

I am currently making a scrollbar program using ScrollPane and Dimension. I have to use those classes.
When I click "ok" button, that calls dc.enlarge(500,800) method. But it doesn't work.
When it is clicked, Dimension object should be changed and the panel has to show Horizotal
and Vertical scrollbar according to the width and height parameters.
Of course, the size will be calculated by the String contents object's rows and width. But it does not work.
How to resize the Dimension and How to display the Horizontal, Vertical scrollbar accoring to dc.enlarge's parameters?
Plz... help me...
-------------- ScrollerTest.java -----------------------------------------------
import java.awt.*;
import java.applet.Applet;
public class ScrollerTest extends Applet {
   public Scroller sc = null;
    public void init() {
        sc = new Scroller(700,250);
        sc.setVisible(true);
     add(sc);         
}-------------- Scroller.java -----------------------------------------------
import java.awt.*;
import java.awt.Window;
import java.applet.Applet;
import java.awt.event.*;
public class Scroller extends Panel implements  ActionListener {
    private Button btOk;   
    private int width = 0;
    private int height = 0;   
    private DrawCanvas dc;   
    public Scroller(int width, int height){   
        this.width = width;
        this.height = height;   
        dc = new DrawCanvas(width, height);
        setNewsContents();                           
    private void setNewsContents() {
        setLayout(new BorderLayout());
        ScrollPane scroller = new ScrollPane(ScrollPane.SCROLLBARS_AS_NEEDED);       
        scroller.add(dc);
        Adjustable vadjust = scroller.getVAdjustable();
        Adjustable hadjust = scroller.getHAdjustable();
        hadjust.setUnitIncrement(10);
        vadjust.setUnitIncrement(10);
        scroller.setSize(615     , 272);
        btOk = new Button("ok");
        btOk.addActionListener(this);
        add("Center", scroller);
        add("South", btOk);       
    public void actionPerformed(ActionEvent event) {
        if(event.getSource()==btOk) {
            dc.enlarge(500,800);
            dc.validate();
}    -------------- DrawCanvas.java -----------------------------------------------
import java.awt.*;
class DrawCanvas extends Component {
    private int width = 0;
    private int height = 0;
    private Dimension d;
    public DrawCanvas(int width, int height) {
        this.width = width;
        this.height = height;
   Dimension theSize = new Dimension(300, 200);   
   public Dimension getPreferredSize() {
        return new Dimension(width,height);               
   public void enlarge(int width, int height) {       
        theSize.width =  width;
        theSize.height = height;
        setSize(theSize);       
    public void update(Graphics g) {
        paint(g);
    public void paint(Graphics g) {       
        Rectangle r = getBounds();       
        String contents[] = {
        "addition to its usual stable of Clydesdale horses, the company will also enlist help this year ",
        "from racing star Dale Earnhardt Jr., some beer-thieving crabs and a scary hitchhiker.",       
        "The Super Bowl represents an enormous commitment for Budweiser. Bob Lachky, chief creative" ,
        "officer of Anheuser-Busch, said the St. Louis-based brewer has been advertising on the game since 1976 and has been the exclusive alcoholic beverage sponsor since 1989",
        "since 1976 and has been the exclusive alcoholic beverage sponsor since 1989, an arrangement that runs through 2012.",
        "It's important to us because it kicks off our selling season, it's the best platform",
        "possible to launch new ideas or to sustain existing campaigns, and it's absolutely the most efficient way to reach the most  it's absolutely the most efficient way to reach the most",
        "adult consumers in one sitting,",
        "Despite the rise of cable, the Internet other media to compete with broadcast television iewers and enticing a huge array of marketers ",
        ", the Super Bowl remains the most-viewed media event all year, drawing in some 90 million ",
        "viewers and enticing a huge array of marketers to pony up the big bucks for an ad",
        ", the price of which is running as high as $2.6 million for this year's broadcast",
        "on CBS Corp.'s CBS network, up slightly from about a top price of about $2.5 million last year.",
        "Comedian Carlos Mencia, of the Comedy Central show  gets ",
        "a big break with a spot set in a classroom. Lachky predicts that Mencia will get an enormous boost Lachky predicts that Mencia will get an enormous boost ",
        "following the appearance, which similarly did wonders for Cedric the Entertainer.",
        "And what would Budweiser Super Bowl ads be without some animated critters? This year, a ga",
        "ng of mischievous red crabs turn up on a beach to carry off a cooler full of beers. As in past years, Bud is keeping many ",
        g.setColor(new Color(226,250,255));
        g.fillRect(0, 0, r.width, r.height);
        g.setColor(new Color(233,231,224));            
        int line = 35;
        int line_1 = 39;
        for (int i = 0; i < contents.length; i++) {       
             g.setColor(Color.BLACK);
             g.drawString(contents, 5,line);
     g.setColor(new Color(233,231,224));
     g.drawLine(0,line_1,605,line_1);
     line += 20;
     line_1 += 20;

Similar Messages

  • Resizing ScrollPane and Dimension

    I am currently making a scrollbar program using ScrollPane and Dimension. I have to use those classes.
    When I click "ok" button, that calls dc.enlarge(500,800) method. But it doesn't work.
    When it is clicked, Dimension object should be changed and the panel has to show Horizotal
    and Vertical scrollbar according to the width and height parameters.
    Of course, the size will be calculated by the String contents object's rows and width. But it does not work.
    How to resize the Dimension and How to display the Horizontal, Vertical scrollbar accoring to dc.enlarge's parameters?
    Plz... help me...
    -------------- ScrollerTest.java -----------------------------------------------
    import java.awt.*;
    import java.applet.Applet;
    public class ScrollerTest extends Applet {
       public Scroller sc = null;
        public void init() {
            sc = new Scroller(700,250);
            sc.setVisible(true);
         add(sc);         
    }-------------- Scroller.java -----------------------------------------------
    import java.awt.*;
    import java.awt.Window;
    import java.applet.Applet;
    import java.awt.event.*;
    public class Scroller extends Panel implements  ActionListener {
        private Button btOk;   
        private int width = 0;
        private int height = 0;   
        private DrawCanvas dc;   
        public Scroller(int width, int height){   
            this.width = width;
            this.height = height;   
            dc = new DrawCanvas(width, height);
            setNewsContents();                           
        private void setNewsContents() {
            setLayout(new BorderLayout());
            ScrollPane scroller = new ScrollPane(ScrollPane.SCROLLBARS_AS_NEEDED);       
            scroller.add(dc);
            Adjustable vadjust = scroller.getVAdjustable();
            Adjustable hadjust = scroller.getHAdjustable();
            hadjust.setUnitIncrement(10);
            vadjust.setUnitIncrement(10);
            scroller.setSize(615     , 272);
            btOk = new Button("ok");
            btOk.addActionListener(this);
            add("Center", scroller);
            add("South", btOk);       
        public void actionPerformed(ActionEvent event) {
            if(event.getSource()==btOk) {
                dc.enlarge(500,800);
                dc.validate();
    }    -------------- DrawCanvas.java -----------------------------------------------
    import java.awt.*;
    class DrawCanvas extends Component {
        private int width = 0;
        private int height = 0;
        private Dimension d;
        public DrawCanvas(int width, int height) {
            this.width = width;
            this.height = height;
       Dimension theSize = new Dimension(300, 200);   
       public Dimension getPreferredSize() {
            return new Dimension(width,height);               
       public void enlarge(int width, int height) {       
            theSize.width =  width;
            theSize.height = height;
            setSize(theSize);       
        public void update(Graphics g) {
            paint(g);
        public void paint(Graphics g) {       
            Rectangle r = getBounds();       
            String contents[] = {
            "addition to its usual stable of Clydesdale horses, the company will also enlist help this year ",
            "from racing star Dale Earnhardt Jr., some beer-thieving crabs and a scary hitchhiker.",       
            "The Super Bowl represents an enormous commitment for Budweiser. Bob Lachky, chief creative" ,
            "officer of Anheuser-Busch, said the St. Louis-based brewer has been advertising on the game since 1976 and has been the exclusive alcoholic beverage sponsor since 1989",
            "since 1976 and has been the exclusive alcoholic beverage sponsor since 1989, an arrangement that runs through 2012.",
            "It's important to us because it kicks off our selling season, it's the best platform",
            "possible to launch new ideas or to sustain existing campaigns, and it's absolutely the most efficient way to reach the most  it's absolutely the most efficient way to reach the most",
            "adult consumers in one sitting,",
            "Despite the rise of cable, the Internet other media to compete with broadcast television iewers and enticing a huge array of marketers ",
            ", the Super Bowl remains the most-viewed media event all year, drawing in some 90 million ",
            "viewers and enticing a huge array of marketers to pony up the big bucks for an ad",
            ", the price of which is running as high as $2.6 million for this year's broadcast",
            "on CBS Corp.'s CBS network, up slightly from about a top price of about $2.5 million last year.",
            "Comedian Carlos Mencia, of the Comedy Central show  gets ",
            "a big break with a spot set in a classroom. Lachky predicts that Mencia will get an enormous boost Lachky predicts that Mencia will get an enormous boost ",
            "following the appearance, which similarly did wonders for Cedric the Entertainer.",
            "And what would Budweiser Super Bowl ads be without some animated critters? This year, a ga",
            "ng of mischievous red crabs turn up on a beach to carry off a cooler full of beers. As in past years, Bud is keeping many ",
            g.setColor(new Color(226,250,255));
            g.fillRect(0, 0, r.width, r.height);
            g.setColor(new Color(233,231,224));            
            int line = 35;
            int line_1 = 39;
            for (int i = 0; i < contents.length; i++) {       
                 g.setColor(Color.BLACK);
                 g.drawString(contents, 5,line);
         g.setColor(new Color(233,231,224));
         g.drawLine(0,line_1,605,line_1);
         line += 20;
         line_1 += 20;

    The class names have been changed so you can run this as-is without name-clashing.
    //  <applet code="ST" width="720" height="300"></applet>
    import java.awt.*;
    import java.awt.event.*;
    import java.applet.Applet;
    public class ST extends Applet {
        public ScrollerRx sc;
        public void init() {
            sc = new ScrollerRx(700,250);
            add(sc);
    class ScrollerRx extends Panel implements ActionListener {
        private Button btOk;
        private DrawCanvasRx dc;
        public ScrollerRx(int width, int height) {
            dc = new DrawCanvasRx(width, height);
            setNewsContents();
        private void setNewsContents() {
            setLayout(new BorderLayout());
            ScrollPane scroller = new ScrollPane(ScrollPane.SCROLLBARS_AS_NEEDED);
            scroller.add(dc);
            Adjustable vadjust = scroller.getVAdjustable();
            Adjustable hadjust = scroller.getHAdjustable();
            hadjust.setUnitIncrement(10);
            vadjust.setUnitIncrement(10);
            scroller.setSize(615, 272);
            btOk = new Button("ok");
            btOk.addActionListener(this);
            add("Center", scroller);
            add("South", btOk);
        public void actionPerformed(ActionEvent event) {
            if(event.getSource()==btOk) {
                dc.enlarge(500,800);
                // validate is a Container method.
                validate();
    class DrawCanvasRx extends Component {
        Dimension theSize = new Dimension(300, 200);
        String[] contents = {
            "addition to its usual stable of Clydesdale horses, the company will " +
            "also enlist help this year ",
            "from racing star Dale Earnhardt Jr., some beer-thieving crabs and a " +
            "scary hitchhiker.",       
            "The Super Bowl represents an enormous commitment for Budweiser. Bob " +
            "Lachky, chief creative" ,
            "officer of Anheuser-Busch, said the St. Louis-based brewer has been " +
            "advertising on the game since 1976 and has been the exclusive alcoholic " +
            "beverage sponsor since 1989",
            "since 1976 and has been the exclusive alcoholic beverage sponsor since " +
            "1989, an arrangement that runs through 2012.",
            "It's important to us because it kicks off our selling season, it's the " +
            "best platform",
            "possible to launch new ideas or to sustain existing campaigns, and it's " +
            "absolutely the most efficient way to reach the most  it's absolutely " +
            "the most efficient way to reach the most",
            "adult consumers in one sitting,",
            "Despite the rise of cable, the Internet other media to compete with " +
            "broadcast television iewers and enticing a huge array of marketers ",
            ", the Super Bowl remains the most-viewed media event all year, drawing " +
            "in some 90 million ",
            "viewers and enticing a huge array of marketers to pony up the big bucks " +
            "for an ad",
            ", the price of which is running as high as $2.6 million for this year's " +
            "broadcast",
            "on CBS Corp.'s CBS network, up slightly from about a top price of about " +
            "$2.5 million last year.",
            "Comedian Carlos Mencia, of the Comedy Central show  gets ",
            "a big break with a spot set in a classroom. Lachky predicts that Mencia " +
            "will get an enormous boost Lachky predicts that Mencia will get an " +
            "enormous boost ",
            "following the appearance, which similarly did wonders for Cedric the " +
            "Entertainer.",
            "And what would Budweiser Super Bowl ads be without some animated " +
            "critters? This year, a ga",
            "ng of mischievous red crabs turn up on a beach to carry off a cooler " +
            "full of beers. As in past years, Bud is keeping many ",
        public DrawCanvasRx(int width, int height) {
            theSize.setSize(width, height);
        public Dimension getPreferredSize() {
            System.out.printf("theSize = [%d, %d]%n", theSize.width, theSize.height);
            return theSize;
        public void enlarge(int width, int height) {
            theSize.width  = width;
            theSize.height = height;
            // Mark this component as needing a new layout.
            invalidate();
        public void update(Graphics g) {
            paint(g);
        public void paint(Graphics g) {
            Rectangle r = getBounds();
            g.setColor(new Color(226,250,255));
            g.fillRect(0, 0, r.width, r.height);
            g.setColor(new Color(233,231,224));
            int line = 35;
            int line_1 = 39;
            for (int i = 0; i < contents.length; i++) {
                g.setColor(Color.BLACK);
                 g.drawString(contents, 5, line);
         g.setColor(new Color(233,231,224));
         g.drawLine(0, line_1, 605, line_1);
         line += 20;
         line_1 += 20;

  • Funny Behaviour (scrollpane and jbutton tricking me)

    Hi,
    I'm close to freaking out. I'm building a GUI that acts as kind of data base editor. There is a combobox to select a table, a scrollpane for viewing and thre buttons to add/remov/edit rows. My test data comes from a Properties object and is transferred into a TableModel in order to create and display the table.
    I pick a table from the comobox and the the table is displayed and the buttons are enabled. As soon as the mouse leaves the scrollpane and enters it or one of the buttons again the buttons become disabled and the table disappears. Picking the table again shows everything again, apart from leaving the add-Button disabled from time to time.
    There is a method that is called when the user selects no table but the initial "Select a table" item in the combo box. This method is NOT called (there is debug output to indicate this). There is no MouseListener or MouseMotionListener added to any component.
    What is this??? Why are sometimes only 2 buttons enabled instead of all three?
    This is the event handling code
    private void displayCategory(String category){
            // get category data
            Properties data = getTestProps();
            // create table
            ProfileTableModel ptm = new ProfileTableModel(data);
            ptm.addTableModelListener(this);
            // show table
            JTable table = new JTable(ptm);
            table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
            ListSelectionModel rowSM = table.getSelectionModel();
            rowSM.addListSelectionListener(new ListSelectionListener() {
                public void valueChanged(ListSelectionEvent e) {
                    //Ignore extra messages.
                    if (e.getValueIsAdjusting()) return;
                    ListSelectionModel lsm =
                            (ListSelectionModel)e.getSource();
                    if (lsm.isSelectionEmpty()) {
                        System.err.println("GUI no row selected");
                    } else {
                        int selectedRow = lsm.getMinSelectionIndex();
                        System.err.println("GUI row #" + selectedRow + " selected");
            profilePanel.displayTable(table, true);
        private void clearDisplay(){
            System.err.println("GUI DISPLAY NOTHING");
            profilePanel.displayNothing();
        public void itemStateChanged(ItemEvent e) {
            System.err.println("GUI ITEM STATE CHANGED " + e);
            if (e.getStateChange() == ItemEvent.SELECTED){
                if (e.getItem() instanceof BoxItem){
                    final String cmd = ((BoxItem)e.getItem()).getCommand();
                    (new Thread(new Runnable(){public void run(){displayCategory(cmd);}})).start();
                } else {
                    clearDisplay();
        }This is the GUI code
        protected void displayTable(JTable table, boolean editable){
            addButton.setEnabled(editable);
            removeButton.setEnabled(editable);
            editButton.setEnabled(editable);
            table.setPreferredScrollableViewportSize(new Dimension(400, 330));
            scroll.setViewportView(table);
        protected void displayNothing(){
            System.err.println("GUI display nothing . . . . . . . . . . .");
            scroll.setViewportView(blank);
            addButton.setEnabled(false);
            removeButton.setEnabled(false);
            editButton.setEnabled(false);
        }Cheers,
    Joachim

    There is a method that is called when the user
    selects no table but the initial "Select a table"
    item in the combo box. This method is NOT called
    But this method displayNothing() is the only place where buttons are
    disabled (at least acording to the posted code fragments).
    How can buttons be disabled when this method is not called?
    You see, it's difficult to test your code because it is not a self-contained
    compilable example.
    A short self-contained compilable example often helps you and
    others to discover an otherwise mysterious bug.

  • Limit Panel Resize to One Dimension?

    Is there an easy way to limit panel resizing to a single dimension? That is, can I make a front panel that allows resizing the HEIGHT but not the WIDTH?
    What would be nice is if there was a way to set the "VI Properties>>Window Size" MAXIMUM size along with minimum (default to <Inf>). But I would settle for a programmatic way to do it, too. I tried making a UE to catch the <Panel: Resize> event, and replace the "Left" and "Right" bounds of the NewBounds with those of the OldBounds, but that ended up doing some wonky stuff.
    Anyone out there found a solution for this problem?
    [I should add, I'm still running LV 8.6.1...maybe this has been addressed in later versions?]

    I'm pretty sure that there isn't, as I don't think Windows supports it and resizing windows is presumably handled by it.
    If there's a window message associated with the resize, you might be able to intercept it using some platform-specific code, but that's beyond the realm of my own experience.
    One thing you can try to do is disable the resizing completely and then add your own resizing logic and code (such as buttons near the edge which will expand or compact the UI by X pixels). I think this is what you usually see in programs which allow expanding in only one direction (although usually the buttons expose an entire pane at once).
    Try to take over the world!

  • How to Build Attribute Dimension Dynamically & Load with LCM?

    Hi, I'm trying to modify the existing outline at cilent's site. For some reason, when I pulled the outline with extractor, it didnt come out in the format that is compatible with Outline Load Utility. I was told to use LCM so I may still load with minimal to no modification to the existing structure of outline.
    So can I build dimensions dynamically in EXCEL then load with LCM and push to Planning?

    The log came back with many unrecognized headers in the outline. I spoke to Oracle Support many times, and they said that the format of our outline is improper for Outline Load Utility to read.
    Since the outline has already been incorporated, we are not allowed to many any significant changes. That is why we were advised to use LCM.
    I tried to use a sample of one of the existing attribute dimensions in XML as the base and build the new attribute but it failed. I would appreciate if you can provide steps by steps resources to show how to add new attributes to the existing outline.

  • Bug in LR 5.6 export "Resize to Fit: Dimensions" feature?

    A site that I shoot for requires uploaded photos to be EXACTLY 3000 x 2216 pixel JPGs. In LR 5.6 I created a custom crop aspect 3.000 x 2.216 (~1.354:1). When I export the images, I set the "Resize to fit" parameters to be "Dimensions" and 3000 x 2216 pixels (also, "Don't enlarge" is OFF, and resolution is 300 ppi). However, most of the Nikon D800 RAW photos I export this way end up being 2992 x 2216. For example I cropped an image using the custom aspect and the dimensions became 3320 x 4495, which is also ~1.354:1. However when I export this using the above "resize to fit" parameters, the resulting image is 2216 x 2992.Another image cropped to 4194 x 5677 correctly exported at 2216 x 3000.
    Is this a bug or am I misunderstanding something here.

    Sorry, Bob, you are confusing the "resize to width and height" setting, which preserves aspect ratio, with the "resize to fit dimensions" setting, which is supposed to set the exact dimensions, even if it changes the aspect ratio.
    From the Lightroom help pages:
    Dimensions - Applies the higher value to the longer edge of the photo and the lower value to the shorter edge regardless of the photo’s original aspect ratio. Specifying 400 x 600, for example, produces a 400 x 600 portrait photo or a 600 x 400 landscape photo.
    I'm pretty sure this is a bug, but I can't figure out a workaround other than to write a Photoshop action to fix the dimensions after I export them.

  • Resizing portrait and landscape formats

    Is it possible to resize portrait and landscape format photographs in one single batch process. So that for example all portrait formats become 800 wide and all landscape formats become 800 high? Or do i have to put them in separate folders before resizing?

      Separate folders unfortunately in Elements, unless you first rotate, which is not recommended. You can do it in Lightroom by export and simply specifying the dimension of the long side.
     

  • Resizing JFrames and JPanels !!!

    Hi Experts,
    I had one JFrame in which there are three objects, these objects are of those classes which extends JPanel. So, in short in one JFrame there are three JPanels.
    My all JPanels using GridBagLayout and JFrame also using same. When I resize my JFrame ,it also resize my all objects.
    My Problem is how should i allow user to resize JPanels in JFrame also?? and if user is resizing one JPanel than other should adjust according to new size ...
    Plese guide me, how should i do this ...
    Thanknig Java Community,
    Dhwanit Shah

    Hey there, thanx for your kind intereset.
    Here is sample code .
    In which there is JFrame, JPanel and in JPanel ther is one JButton.Jpanel is added to JFrame.
    I want to resize JPanel within JFrame,I am able to do resize JFrame and JPanel sets accroding to it.
    import java.awt.*;
    import javax.swing.*;
    import com.borland.jbcl.layout.*;
    public class FramePanel extends JFrame {
    JPanel contentPane;
    GridBagLayout gridBagLayout1 = new GridBagLayout();
    public FramePanel() {
    try {
    jbInit();
    catch(Exception e) {
    e.printStackTrace();
    public static void main(String[] args) {
    FramePanel framePanel = new FramePanel();
    private void jbInit() throws Exception {
    contentPane = (JPanel) this.getContentPane();
    contentPane.setLayout(gridBagLayout1);
    this.setSize(new Dimension(296, 284));
    this.setTitle("Frame and Panel Together");
    MyPanel myPanel = new MyPanel();
    this.getContentPane().add(myPanel);
    this.setVisible(true);
    class MyPanel extends JPanel {
    public MyPanel() {
    this.setSize(200,200);
    this.setLayout(new FlowLayout());
    this.setBackground(Color.black);
    this.setVisible(true);
    this.add(new JButton("Dhwanit Shah"));
    I think i might explained my problem
    Dhwanit Shah
    [email protected]

  • Resize canvas and export as a batch?

    I have a collection of about 75 images for which I need each
    one placed on a
    resized canvas, and then exported. I'm having trouble making
    a pair of
    history steps that I can save to use for a batch operation.
    Can anyone
    help, please?
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================

    No. I'm saying I have a collection of irregularly dimensioned
    images (none
    wider or taller than 225Wx150H). I want them all saved on a
    canvas that has
    those dimensions so that I can rotate them without having
    screen jitters. I
    do not need to resize any of these images, only to add canvas
    as needed.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "Joe Makowiec" <[email protected]> wrote in
    message
    news:[email protected]..
    > On 13 Oct 2008 in macromedia.fireworks, Murray *ACE*
    wrote:
    >
    >> I have a collection of about 75 images for which I
    need each one
    >> placed on a resized canvas, and then exported. I'm
    having trouble
    >> making a pair of history steps that I can save to
    use for a batch
    >> operation. Can anyone help, please?
    >
    > Are you saying that you want to layer two images, a
    fixed background and
    > a changing foreground? I haven't tried anything like
    that in Fireworks.
    > If you can't find a method in FW, ImageMagick and a bit
    of shell
    > scripting will:
    >
    >
    http://www.imagemagick.org/script/composite.php
    >
    http://www.imagemagick.org/Usage/compose/
    >
    > --
    > Joe Makowiec
    >
    http://makowiec.net/
    > Email:
    http://makowiec.net/contact.php

  • In Answers am seeing "Folder is Empty" for Logical Fact and Dimension Table

    Hi All,
    Am working on OBIEE Answers, on of sudden when i clicked on Logical Fact table it showed me as "folder is empty". I restarted all the services and then tried still showing same for Logical Fact and Dimension tables but am able to see all my reports in Shared Folders. I restarted the machine too but no change. Please help me out to resolve this issue.
    Thanks in Advance.
    Regards,
    Rajkumar.

    First of all, follow the forum etiquette :
    http://forums.oracle.com/forums/ann.jspa?annID=939
    React or mark as anwser the post that the user gave.
    And for your question, you must check the log for a possible corrupt catalog :
    OracleBIData_Home\web\log\sawlog0.log

  • Best practice when FACT and DIMENSION table are the same

    Hi,
    In my physical model I have some tables that are both fact and dimension table, i.e. in the BMM they are of course separated into Fact and Dim source (2 different units) and it works fine. But I can see that there will be trouble when having more fact tables and I e.g. have a Period dimension pointing to all the different fact tables (different sources).
    Seems like the best solution to this is to have an alias of the fact/transaction table and have 2 "copies" of the transaction table (one for fact and one for dimension table) in the physical layer. Only bad thing is that there will then allways be 2 lookups in the same table when fetching data from the dimension and the fact table.
    This is not built on a datawarehouse - so the architecture is thereby more complex. Hope this was understandable (trying to make a short story of it).
    Any best practice on this? Or other suggestions.

    Id recommend creation of a view in the database. if its an oracle DB, materialised views would be a huge performance benefit. you just need to make sure that the MVs are updated when the source is updated.
    -Domnic

  • Can't view my Cube and Dimension Data with the Cube Viewer

    I'm new in using OWB, i'm using Oracle 10g release1 with OWB R2 also Oracle WorkFlow 2.6.3.
    When studying with the steps from the OTN pages (start01, flat-file02, relational-wh-03, etl-mappings, deployingobjects, loading-warehouse and bi-modeling)
    the loading was success, i guess...
    But when I want to see the data in the cube and dimension, an error occurs.
    It says
    " CubeDV_OLAPSchemaConnectionException_ENT_06952??
    CubeDV_OLAPSchemaConnectionException_ENT_06952??
         at oracle.wh.ui.owbcommon.dataviewer.dimensional.DataViewerConnection.connect(DataViewerConnection.java:115)
         at oracle.wh.ui.owbcommon.dataviewer.dimensional.DimDataViewerMain.BIBeansConnect(DimDataViewerMain.java:433)
         at oracle.wh.ui.owbcommon.dataviewer.dimensional.DimDataViewerMain.init(DimDataViewerMain.java:202)
         at oracle.wh.ui.owbcommon.dataviewer.dimensional.DimDataViewerEditor._init(DimDataViewerEditor.java:68)
         at oracle.wh.ui.editor.Editor.init(Editor.java:1115)
         at oracle.wh.ui.editor.Editor.showEditor(Editor.java:1431)
         at oracle.wh.ui.owbcommon.IdeUtils._tryLaunchEditorByClass(IdeUtils.java:1431)
         at oracle.wh.ui.owbcommon.IdeUtils._doLaunchEditor(IdeUtils.java:1344)
         at oracle.wh.ui.owbcommon.IdeUtils._doLaunchEditor(IdeUtils.java:1362)
         at oracle.wh.ui.owbcommon.IdeUtils.showDataViewer(IdeUtils.java:864)
         at oracle.wh.ui.owbcommon.IdeUtils.showDataViewer(IdeUtils.java:851)
         at oracle.wh.ui.console.commands.DataViewerCmd.performAction(DataViewerCmd.java:19)
         at oracle.wh.ui.console.commands.TreeMenuHandler$1.run(TreeMenuHandler.java:188)
         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) "
    Can somebody explain what is happening, I really don't understand, when the cube viewer window appears, there's no data in it....
    I realy need help with this...

    I'm new in using OWB, i'm using Oracle 10g release1 with OWB R2 also Oracle WorkFlow 2.6.3.
    When studying with the steps from the OTN pages (start01, flat-file02, relational-wh-03, etl-mappings, deployingobjects, loading-warehouse and bi-modeling)
    the loading was success, i guess...
    But when I want to see the data in the cube and dimension, an error occurs.
    It says
    " CubeDV_OLAPSchemaConnectionException_ENT_06952??
    CubeDV_OLAPSchemaConnectionException_ENT_06952??
    at oracle.wh.ui.owbcommon.dataviewer.dimensional.DataViewerConnection.connect(DataViewerConnection.java:115)
    at oracle.wh.ui.owbcommon.dataviewer.dimensional.DimDataViewerMain.BIBeansConnect(DimDataViewerMain.java:433)
    at oracle.wh.ui.owbcommon.dataviewer.dimensional.DimDataViewerMain.init(DimDataViewerMain.java:202)
    at oracle.wh.ui.owbcommon.dataviewer.dimensional.DimDataViewerEditor._init(DimDataViewerEditor.java:68)
    at oracle.wh.ui.editor.Editor.init(Editor.java:1115)
    at oracle.wh.ui.editor.Editor.showEditor(Editor.java:1431)
    at oracle.wh.ui.owbcommon.IdeUtils._tryLaunchEditorByClass(IdeUtils.java:1431)
    at oracle.wh.ui.owbcommon.IdeUtils._doLaunchEditor(IdeUtils.java:1344)
    at oracle.wh.ui.owbcommon.IdeUtils._doLaunchEditor(IdeUtils.java:1362)
    at oracle.wh.ui.owbcommon.IdeUtils.showDataViewer(IdeUtils.java:864)
    at oracle.wh.ui.owbcommon.IdeUtils.showDataViewer(IdeUtils.java:851)
    at oracle.wh.ui.console.commands.DataViewerCmd.performAction(DataViewerCmd.java:19)
    at oracle.wh.ui.console.commands.TreeMenuHandler$1.run(TreeMenuHandler.java:188)
    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) "
    Can somebody explain what is happening, I really don't understand, when the cube viewer window appears, there's no data in it....
    I realy need help with this...

  • The Difference between "Cell Data" and "Dimension Data"?

    What is the difference between the tab "Cell Data" and "Dimension Data" in SSAS?

    Article quote: " SSAS provides the way to secure analysis services database/cube data from unauthorized access. Analysis services provides secure access by creating object called "roles". After creation of role, user's windows login credential can be used
    to enroll into particular role because analysis services identifies user from their windows login credentials . You can protect your data in roles at two levels:
    1) Dimension level
    2) Cell level
    If user has been assigned more than one role, analysis services loop through all assigned roles after login. Analysis services finds all permission level for the particular user and  union all the permission levels.
    If two roles has contradictory access for user then particular access will be allowed. Suppose role1 says Australia data access and role2 denies Australia data access then access to Australia data will be allowed. "
    LINK:
    http://www.msbiconcepts.com/2010/10/ssas-data-security-dimension-and-cell.html
    Kalman Toth Database & OLAP Architect
    IPAD SELECT Query Video Tutorial 3.5 Hours
    New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012

  • EDGE and HTML dynamic text in a "box" with scroll bar

    I'm new to EDGE, a win7pro master collection cs5.5 suite owner. I'm mainly in the Film/Video post production field (mostly AE, PPro, Pshop, IA) but have been branching into web design the last couple of years.  I use Dreamweaver, Fireworks, Flash. While I'm a expert user with all the Film/video apps, I would say I only have intermediate ability with the web apps. While I understand a lot of programing logic bulding blocks I'm not a coder.
    So since we're told "flash is dead",  my interest in Edge is to try to do some of the things that I can currently do in flash in  EDGE. I was excited when Edge first came out but lost interest when it became obvious that Adobe was not going to offer Edge and Muse to "suite owners" but only in their force feeding of the "Cloud". Better known as the "golden goose" for adobe stockholders and a never ending perpetual hole in the pocket for users. Anyway....
    I spent the last couple of days doing some of the tuts and messing with the UI. It's matured a lot since I was here last.
    I've been working on a flash site for a sports team where one of the pages is a player profile page where college recuriters and other interested parties can view recuriting relavent info/stats about players. This is how it works. While on the "Team" page a users clicks on  a button labled "Player Profiles" . (Animation) A "page" flies in and unfurls from the upper right corner (3d page flips effect created in AE played by flash as a frame SEQ). Once it lands filling most of the center of the screen there is a bright flash. As the brightness fades we see the "page" is a bordered box with a BG image of a ball field(End). (Animation) from behind the border in fly small pictures (player head shots with name and jersey number). They stream in and form a circle like a wagon train and the team logo zooms up from infinity to the center of the circle(End). As the user mouses over a player's pic it zooms up a little and gets brighter (like mouseover image nav thumbs for a image slider). If the user clicks on a player's head shot it flips over and scales up to become a text box with a scrollbar. The content of the box is a mix of images, static and dynamic text fields populated from data in an "player info data base" XML file, and some hyperlinks. It's all kept updated dynamicaly with current stats, info and images from the XML file. There is also a "PDF" button that allows the user to open/save/print a PDF of the player's profile (the PDF's are static files for now but the choice of which pdf to retrive is dynamicaly supplied via the XML file.
    So.... Is Edge now able to do something like this?  Would it need to be a collection of small animations? could these be "assembled" and connected as an asset in dreamweaver ?
    I thought I would approach this from the end (ie click on an image and display a box with dynamic TEXT fileds. ) since that is the most important part, ie displaying the dynamicaly updated profile info.  Sooooo....
    Can Edge display a scrolling text box with Images, static text, and html dynamic text in it??
    Joel

    The code is in composition ready. Click the filled {}

  • Update new material master weight and dimension in open sales orders and de

    Hi,
    Iu2019m maintaining gross weight, net weight, volume in material master. When the time of sales order entry in VA01 its calculating weight and dimensions based on material master and order quantity. And I create deliveries in VL01N.
    If I made a correction in the net and gross weight in material master after I created the sales order will the correct net and gross weight will pick up at the delivery creation.
    In other term is the VL01N net and gross weight is taking from which is available in SO or Material master.
    Is there any standard transaction to update already existing open sales order, delivery net and gross weight once it is corrected in material master?
    Please advice.
    Sam

    Is there any standard transaction to update
    No it is not possible to update the weight in existing sale order or delivery.  You have to change it manually or create a new sale order.   Weight in delivery will be fetched from sale order only and hence,  whatever delivery you create referencing a sale order, system will copy whatever is there.
    thanks
    G. Lakshmipathi

Maybe you are looking for

  • HOw can I transfer my old photoshop cs version 8 onto my new computer?

    I have an older mac computer (10.4.11) with Photoshops cs version 8.  Id did not get transferred onto my new mac computer, so i had to buy Elements when I got the new one.  I am very much missing the "pen" tool!  Is there any way I can upgrade my pho

  • Error while creating service PO by BAPI_PO_CREATE1

    Hi, I am trying to create a service PO using the BAPI_PO_CREATE1 with reference to service PR and I am getting an "In case of account assignment, please enter acc. assignment data for item" for which i found so many threads but none had resolved this

  • This Operation Could Not Be Completed...No Video

    So I'm getting this error message "This Operation Could Not Be Completed...No Video" when trying to Log and Capture some footage from a mini DV tape. I've tried this on my Macbook Pro, 10.5.8, Final Cut 7 I've tried this on my Powerbook G4, 10.4.11 F

  • Custom search help tab for "Material" in ME21N...

    Experts, I have a requirement to create a separate tab in the standard collective search help that is triggered in F4 at the Material field in PO items for ME21N to add an additional search criterion for Materials by Material Group, there by reducing

  • Japan Mac Mini compatible with Spanish system?

    Hello, I'm going to Japan this summer and I've planed to buy a Mac Mini there (there are much more cheaper, about 150-200€ difference). Before doing it I would like to know if I will have any problems with warranty, hardware problems (like monitor, k