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;

Similar Messages

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

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

  • 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

  • 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

  • Unable to embed External CSS file, dropdown list,filter panel and dimension filter are not working in SAP Design Studio Tool

    Hello Everyone,
    I am new to SAP Design Studio. I am working on creating dashboards and I am using Design Studio 1.2 version. Please suggest some solutions for the following issues. Thanks in Advance.
    1. External CSS file which is embeded using custom CSS option under "application component properties" is not working.
        * I kept the external CSS file inside repository-> my application folder.
    2. During runtime, getting javascript error while selecting '-' option from filter panel.
    3. Unable to select or type dimension name under "dimension filer component" properties.
    4. Getting runtime error for dropdown list, and I have inserted the following code under "onStartup" option of Application component properties.
    "DROPDOWN_1.setItems(DS_1.getMemberList("PRODUCTREF", MemberPresentation.INTERNAL_KEY, MemberDisplay.TEXT, 20));
    and dimension values are not populated in auto suggest."

    There should be an Error Log under View > Error Log that gives you more details of these errors.  Could you add that?  There is also a View > Script Problems log that provides more details as well.

  • About Surrogate Key and Dimension Key on OWB 10.2

    Hi, everyone.
    I am using OWB 10.2 and I have a question about Surrogate key and Dimension Key.
    I indicated the foreign key as VARCHAR2 type in Fact Table and Dimension Key as VARCHAR2 type is operated as Primary key in Dimension Table. I made Single Level in Dimension Table.
    I know that Dimension Key stores the surrogate ID for dimension and is the primary key of the table. Also, Surrogate ID should be only NUMBER type.
    So, in this case, Surrogate ID is NUMBER type
    Dimension key should be NUMBER type to store the surrogate ID.
    But, Dimension key also should operate the primary to relate Foreign key as VARCHAR2 type.
    How I can solve this confusing condition?
    Please let me know that.
    JWS

    Hi JWS,
    From a SQL point of view it should not be a problem to join a NUMBER field to a VARCHAR2 field because during execution there will be an implicite cast for the NUMBER value to a VARCHAR2 value. See the example below.
       SELECT * FROM DUAL
       WHERE   1 = '1'From an OWB point of view it is not possible to have a Dimension with an NUMBER value Key that has a relation to a VARCHAR2 value Foreign key in a Fact table. This is caused due to the creation of a Fact table in OWB in which the Foreign keys in it are build from de Dimension tables that refer to them.
    You will loose the reference to the Dimension when changing the type of the Foreign Key.
    To resolve this issue I would advise you to use a Sequence that generates your Surrogate Key (NUMBER type) for the Dimension table and store it in the Primary Key Column (VARCHAR2 type).
    When validating the mapping you will get a warning, but when executing this should give no problems.
    Regards,
    Ilona

Maybe you are looking for

  • Clear text value not allowed for credentials in config.xml

    I am in the process of migrating our J2EE application from Weblogic 8.1 to Weblogic 10 MP1 and have converted config.xml to the new schema. When starting up in production mode, I see the following error which causes the server to shutdown: <Server fa

  • SAP Netweaver 7.02 installation problem, "Start Instance" not possible??

    Hello, i need help with my "new" Problem during installation of SAP Netweaver, everything is ok until "Phase 21 of 24'" is reached, here should the instance started, i receive this error: "An error occurred while processing option SAP NetWeaver 7.0 i

  • I phone camera and photo album

    When I got my iphone I went a bit snap happy. I now have about 80 pictures stored on the phone. I want to delete the whole roll - deleting one by one takes to long. Is there way I can do this? Also, my phone has become much slower than it was, I wond

  • Outlook 2013 "Unknown Error" Message Box

    I am running Outlook 2013 Professional and we have Exchange 2010.  Periodically when I am deleting messages I receive a box that says "Unknown Error" it doesn't say anything else and if I click OK it goes away... its more of an annoyance but we are g

  • Using CSS Problem

    Why do I have to use class selector and not a type selector? <mx:Style> Label { fontSize: 16px; fontWeight: bold; .test { fontSize: 16px; fontWeight: bold; </mx:Style> <mx:Label text="Test" styleName="test"/> If I remove the styleName property tellin