Need help placing objects in JPanel

      public SimpleTab()
            ButtonGroup group = new ButtonGroup();
            group.add(videoandaudio);
            group.add(audioonly);
            group.add(videoonly);
            videoandaudio.setSelected(true);    
            JFrame frame1 = new JFrame("project");
            frame1.setSize(1000, 700);
            JLabel urllabel = new JLabel("URL");
            JLabel songlabel = new JLabel ("Enter Song");
            JLabel artistlabel = new JLabel ("Enter Artist");
            JLabel crop1label = new JLabel ("Start Time");
            JLabel crop2label = new JLabel ("Stop Time");
            url.setColumns(25);
            GridBagLayout gbl;
            GridBagConstraints gbc;
            JEditorPane jep;
            gbl=new GridBagLayout();
            gbc=new GridBagConstraints();
            p.setBounds(0,0,30,600);
            p.setLayout(gbl);
            gbc.gridx=0;
            gbc.gridy=-20;
            gbl.setConstraints(urllabel,gbc);
            gbc.gridx=0;       
            gbc.gridy=0;
            gbc.weightx=0.0;
            gbl.setConstraints(urllabel,gbc);
            p.add(urllabel);
            gbc.gridx=10;
            gbc.gridy=0;
            gbc.weightx=1.0;
            gbl.setConstraints(url,gbc);
            p.add(url);
            gbc.gridx=0;
            gbc.gridy=20;
            gbc.weightx=0.0;
            gbl.setConstraints(artistlabel,gbc);
            p.add(artistlabel);
            gbc.gridx=10;
            gbc.gridy=20;
            gbc.weightx=1.0;
            gbl.setConstraints(artist,gbc);
            p.add(artist,gbc);
            gbc.gridx=0;
            gbc.gridy=40;
            gbc.weightx=0.0;
            gbl.setConstraints(songlabel,gbc);
            p.add(songlabel);
            gbc.gridx=10;
            gbc.gridy=40;
            gbc.weightx=0;
            gbl.setConstraints(song,gbc);
            p.add(song,gbc);
            gbc.gridx=0;
            gbc.gridy=60;
            gbc.weightx=0.0;       
            gbl.setConstraints(crop1label,gbc);
            p.add(crop1label,gbc);
            gbc.gridx=10;
            gbc.gridy=60;
            gbc.weightx=1.0; 
            gbl.setConstraints(crop1,gbc);
            p.add(crop1,gbc);
            gbc.gridx=0;
            gbc.gridy=80;
            gbc.weightx=0.0;
            gbl.setConstraints(crop2label,gbc);
            p.add(crop2label);
            gbc.gridx=10;
            gbc.gridy=80;
            gbc.weightx=1.0;
            gbl.setConstraints(crop2,gbc);
            p.add(crop2,gbc);
            gbc.gridx=0;
            gbc.gridy=110;
            gbc.weightx=0.0;
            jPanel1.setBorder(BorderFactory.createEtchedBorder());
            jPanel1.setBounds(new Rectangle(70, 40, 10, 200));
            gbc.gridy = 0;
            gbl.setConstraints(videoandaudio, gbc);
            jPanel1.add(videoandaudio);
            gbc.gridy = 20;
            gbl.setConstraints(audioonly, gbc);
            jPanel1.add(audioonly);
            gbc.gridy = 40;
            gbl.setConstraints(videoonly, gbc);
            jPanel1.add(videoonly);
            gbc.gridx = 0;
            gbc.gridy = 190;
            gbl.setConstraints(jPanel1, gbc);
            p.add(jPanel1);
            DownloadsTableModel1.addColumn("Video File");
            DownloadsTableModel1.addColumn("Status");
            DownloadsTable.getColumnModel().getColumn(0).setPreferredWidth(200);
            DownloadsTable.getColumnModel().getColumn(1).setPreferredWidth(200);
            DownloadsTable.setColumnSelectionAllowed(false);
            DownloadsTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
            DownloadsTable.setDefaultRenderer(Object.class, new DownloadsTableCellRenderer());
            JScrollPane jScrollPane1 = new JScrollPane();           
            jScrollPane1.setBounds(new Rectangle(10, 130, 400, 90));
            jScrollPane1.getViewport().add(DownloadsTable);
            gbc.gridx = 0;
            gbc.gridy = 210;
            gbl.setConstraints(jScrollPane1,gbc);
            p.add(jScrollPane1);
            gbc.gridx=1;
            gbc.gridy=230;
            gbc.weightx=0.0;
            JButton downloadbutton = new JButton();
            downloadbutton.setText("Download");
            gbl.setConstraints(downloadbutton,gbc);
            p.add(downloadbutton);
            JButton pausebutton = new JButton();
            pausebutton.setText("Freeze");
            gbc.gridx = 2;
            gbc.gridy = 230;
            gbl.setConstraints(pausebutton,gbc);
            p.add(pausebutton);
            JButton cancelbutton = new JButton();
            cancelbutton.setText("Cancel");
            gbc.gridx = 3;
            gbc.gridy = 230;
            gbl.setConstraints(cancelbutton, gbc);
            p.add(cancelbutton);
            frame1.add(p);
            frame1.show();
      }[http://www.geocities.com/justinknag/jjjjunit.jpg]
I need to center the radio buttons, as well as the table. Also, I need to create some space in between everything.

You know that you can nest JPanels, each with its own layout, you don't have to try to have everything placed in one JPanel that uses a single grand layout manager. I recommend that you read the Sun tutorial on layout managers, and try playing with them til you figure out what will work best. As it is all I see is an attempt to dump everything in one panel with GridBagLayout.
Also, you would do well to clean up the code, to refactor it into several methods, otherwise it will become a spaghetti code mess.
Good luck!
Edit: Here's what I got when I did this:
[flickr pic|http://farm4.static.flickr.com/3155/2906451640_8deedd7aa3_o.jpg]
I used
BoxLayout over-all for the main panel
A combination of BorderLayout and GridLayout for the top panel
gridlayout for the next radiobutton panel
jscrollpane for the jtable
and gridlayout for the buttons
I avoided GridBagLayout, because I truly despise it.
YMMV of course.
Edited by: Encephalopathic on Oct 1, 2008 7:35 PM

Similar Messages

  • Need help placing a like button on my site.

    I have managed to put a like button on my site, but now i have the next problem. If you look on my site
    http://www.dorff.nl/
    You will see the facebook like buttons hanging on the left side of the page. I really want to place the button on the right side..next to the black buton with the text "mijn portfolio".
    Can you tell me how can i do this?
    Regards  Brian

    Hi Ken,
    i got an other question...  it looks like this one but i think i need a little push into the right direction.
    On my site at this page
    http://www.dorff.nl/company.html
    There is only text.. Now i want to place an image next to Dorff Design
    How can i do this???  The image name is Monitor...
    i think i need a litlle code for css. And i need to place the image inside a div... i think?
    Hope you give me a start..
    Regards Brian
    Date: Mon, 9 Apr 2012 06:52:15 -0600
    From: [email protected]
    To: [email protected]
    Subject: Need help placing a like button on my site.
        Re: Need help placing a like button on my site.
        created by Ken Binney in Dreamweaver - View the full discussion
    You're welcome From my hasty little tip, it looks like you ran with it and added this to your style.css .fb-like Good work guy! PS It's a handsome design.
         Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/4321953#4321953
         To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/4321953#4321953. In the Actions box on the right, click the Stop Email Notifications link.
         Start a new discussion in Dreamweaver by email or at Adobe Forums
      For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

  • Need help placing people / objects into another photo ...realistically

    Hi, I've been a Photoshop user for many years now and have adopted CS4 when it initially came available. My photoshop skills are to a good standard however one thing I always find difficult is taking a selection from one photo (usually a person / object) and placing it into another photo.
    I am able to correct the size and scale and maintain the aspect ratio but I never seem to be able to make the photo look convincing, I know this is a basic part of Photoshop, but I was wondering if any of you could offer some tips or advice on how to make the person / object more realistic and hopefully so that clients won't be able to spot it was missing in the first place.
    Thanks in advance

    The Daily show is a satirical show in the US with John Stewart. As a kind of running joke on "Photoshopped", they often badly photoshop things together, cut and paste style.
    Whether things will ever look correct, is to do with LIGHT. The light on your background has to be the same as the light on your foreground subjects. Color can be easily tweaked and matched but light cannot. Photographers with the right expertise (thinner on the ground than you might think) can look at the light in a destination image, and try and match in the studio, but this is a highly skilled area. I once had a professional job where someone had taken David Beckham to a studio - and they wanted the images realistically comped into beach scenes, with broad sunshine, resulting hard shadows, sunsets and horizons. Unfortunately the photographer was obviously more interested in having fun with a high profile client like Beckham for their book, than they were in lighting correcty for the intended destination images.  Impossible without weeks of painting, and I told them. No point in wasting clients time on images like this.

  • Need help placing images on separate layers

    I'm a novice to Javascript but I've been trying to learn. I have a project where i need to place muliple images from a folder onto separate layers (same page) in a template. I tried to modify "ImageCatalogue" script within InDesign to disastrous results. On another thread someone was kind enough to give me a short script "Objects to Layers" written by Kasyan Servetsky. This was very helpful but not exact to my needs so now I'm starting from scratch. I've been playing with the following code trying to get it to work. It doesn't and I'm getting frustrated. I keep changing this line but it keeps coming back as "undefined":
    myImage.place(newLayer);
    Can someone please point me in the right direction? Is my coding too simple? The end comments are my wish list of add-ons should I ever get these layers working.
    Thanks for your help!
    // script to place images on separate layers
    Main();
    function Main(){
              // get path to folder, ask to select which folder
              var myFolder = Folder.selectDialog("Select folder containing images");
              // use open document
              doc = app.activeDocument;
              // if folder is empty, tell user to select another folder
              if(myFolder.length == 0){
                        selectDiaglog("Folder empty, select new folder");
              else{
              // select each file in myFolder and place on new layer in active document
                        var myImage = myFolder.item;
                        newLayer = doc.layers.add(+1);
                        myImage.place(newLayer);
              alert("Done")
    // rotate image 90 CCW
    // place image at x-6.41, y9.9955 on page
    // rename layer as filename

    Hi,
    Main();
    function Main(){
         // get path to folder, ask to select which folder
         var myFolder = Folder.selectDialog("Select folder containing images");
         // use open document
         doc = app.activeDocument;
         // if folder is empty, exit
         if(!myFolder){
              alert("no Folder selected, I am quitting"); exit();
         // place each file in myFolder on new layer in active document
         // files are filtered by their extension
         var
              myImages = myFolder.getFiles(/\.jpg$|\.tiff$|\.pict$|\.bmp$|\.eps$|\.pdf$/i),
              len = myImages.length, currImg,
              mAngle = 270,
              mX = -6.41,
              mY = 9.9955;
              while (len-->0) {
                   currImg = doc.pages[0].place(
                        myImages[len],     // current file
                        [0,0],     // initial place point
                        doc.layers.add({name: myImages[len].displayName}),          // rename layer as filename
                        false,
                        false,
                        {absoluteRotationAngle: mAngle}          // rotate image 90 CCW
                        )[0].parent;
                   currImg.fit(FitOptions.FRAME_TO_CONTENT);     //  fix frame to content
                   currImg.move([mX,mY]);          // move image at x-6.41, y9.9955 on page
              alert("Done")
    Each image in the same point placed?
    Good help is served here:
    http://www.jongware.com/idjshelp.html
    Each object has properties and methods.
    Used above: folder.getFiles(), page.place(), rectangle.fit() and rectangle.move() methods.
    Jarek

  • Need help placing photo image in laptop screen of a video...

    I have footage that is both zooming and panning, and need a photo image to fit within the laptop screen space during the duration of the pan/zoom.  Should I use "Track Motion" accompanied with key-framing in 2D?  Does this make sense?  Is there an easier way to achieve this, or is that the way to go?
    Here is a rough take of the clip of which I speak.  In reality, we will be placing the same image on both the HDTV and the laptop in the shot.  Hopefully, this will make what I have said above a little more clear.  Hope you can help.  Thanks much.

    If you have CS4 then I would recommend using Mocha for AE (a planar tracking software from imagineers system that comes bundled with AE CS4). It's basically designed for the kinds of stuff you described. There are some helpfull tutorials on the imagineer systems's website:
    http://www.imagineersystems.com/support/mocha-AE/tutorials/

  • Need Help converting objects in a TreeMap to String

    This app counts the number of times a word occurs in a document. I used a HashMap to store the key and value. The I sorted them using TreeMap. Now I need to return the key (String) and value (Integer Object) so they may be print like this -- 'key: value'.
    Example:
    that: 3
    This mean the word 'that' appeared 3 times in the document. Below is my toString() method. TreeMap sorts everything for me but I cant return 'map' because it is not a String. So I iterated through each key and value in the map. But now I dont know how to put all the iterations into 1 String value. I would greatly appreciate any help. Code below.
    Thanks in advance.
    public String toString() {
    Object key = null;
    Object value = null;
    map = new TreeMap(map);
    Set getKeys = map.keySet();
    Iterator iterKeys = getKeys.iterator();
    while (iterKeys.hasNext()) {
    key = (String)iterKeys.next();
    value = map.get(key))
    return; // i need to return a String here
    } // end toString()
    } // end class

    I dont remember posting to the "new Java forum", but I might have. My browser locked up on me so I am not sure what happened. If I did please excuse my double post.
    Are you familar with a way to solve my problem?

  • Need help on object array, please.

    Hello. I'm trying to write a program that stores student id numbers and their names into an array, and then prints them in numerical order. What I did was create an object called DSCC and put it in an array, but I'm having problems. Everytime I run this I get a null pointer exception, here is my code.
    public class Main {
      public Main() {
      public void getStudenInfo(String Number1, String Name, int Number){
        Number1 = JOptionPane.showInputDialog("Enter student number, 999 to quit");
        Number = Integer.parseInt(Number1);
        if(Number != 999){
          Name = JOptionPane.showInputDialog("Enter student name");
      public void putInArray(DSCC ded[], String na, int nu){
          ded[0].studentname = na;
          ded[0].studentnumber = nu;
           System.out.println(ded[0]);
      public void printList(){
      public static void main(String[] args) {
        String name = "";
        String number1 = "";
        int number = 0;
        DSCC[] array = new DSCC[10];
        Main main1 = new Main();
        DSCC d = new DSCC();
         main1.getStudenInfo(number1, name, number);
         while(number != 999){
            main1.putInArray(array, name, number);
            main1.printList();
            main1.getStudenInfo(number1, name, number);
    public class DSCC {
        String studentname;
        String number1;
        int studentnumber;
        public DSCC() {
    }

    There are a couple things i don't get about the code here but let me point out some thing that definately don't work.
    The function getStudentInfo(...) does not change the value of its parameters Number1, Name and Number. You will need to redesign this method to get the entered values. I suggest breaking it up into three functions that return the value that the JOptionPane, like :
    public String getStudentName(){
         return JOptionPane.showInputDialog("Enter Student Name :");
    }And then replace the calls to getStudenInfo() with the three calls.
    Also the array you make is not populated, which is probably the reason for the for the NPE. For example,
    DSCC[] array = new DSCC[10];
    //here come an NullPointerException
    array[0].studentName = "Joe";
    //can't do this... array[0] == null,  studentName does not exist!This happens in your code, though it is split up into different methods. If you trace through you will see that when you call the method putInArray(...) , the array's values are still null. For a fully intialized array, it should be:
    DSCC[] array = new DSCC[10];
    for(int i = 0; i < 10; i++) {
         array[0] = new DSCC();
    array[0].studentName = "Joe";So at some point you need to initialize the values of the array.
    Hope that helps....

  • Need HELP with objects and classes problem (program compiles)

    Alright guys, it is a homework problem but I have definitely put in the work. I believe I have everything right except for the toString method in my Line class. The program compiles and runs but I am not getting the right outcome and I am missing parts. I will post my problems after the code. I will post the assignment (sorry, its long) also. If anyone could help I would appreciate it. It is due on Monday so I am strapped for time.
    Assignment:
    -There are two ways to uniquely determine a line represented by the equation y=ax+b, where a is the slope and b is the yIntercept.
    a)two diffrent points
    b)a point and a slope
    !!!write a program that consists of three classes:
    1)Point class: all data MUST be private
    a)MUST contain the following methods:
    a1)public Point(double x, double y)
    a2)public double x ()
    a3public double y ()
    a4)public String toString () : that returns the point in the format "(x,y)"
    2)Line class: all data MUST be private
    b)MUST contain the following methods:
    b1)public Line (Point point1, Point point2)
    b2)public Line (Point point1, double slope)
    b3)public String toString() : that returns the a text description for the line is y=ax+b format
    3)Point2Line class
    c1)reads the coordinates of a point and a slope and displays the line equation
    c2)reads the coordinates of another point (if the same points, prompt the user to change points) and displays the line equation
    ***I will worry about the user input later, right now I am using set coordinates
    What is expected when the program is ran: example
    please input x coordinate of the 1st point: 5
    please input y coordinate of the 1st point: -4
    please input slope: -2
    the equation of the 1st line is: y = -2.0x+6.0
    please input x coordinate of the 2nd point: 5
    please input y coordinate of the 2nd point: -4
    it needs to be a diffrent point from (5.0,-4.0)
    please input x coordinate of the 2nd point: -1
    please input y coordinate of the 2nd point: 2
    the equation of the 2nd line is: y = -1.0x +1.0
    CODE::
    public class Point{
         private double x = 0;
         private double y = 0;
         public Point(){
         public Point(double x, double y){
              this.x = x;
              this.y = y;
         public double getX(){
              return x;
         public double setX(){
              return this.x;
         public double getY(){
              return y;
         public double setY(){
              return this.y;
         public String toString(){
              return "The point is " + this.x + ", " + this.y;
    public class Line
         private double x = 0;
         private double y = 0;
         private double m = 0;
         private double x2 = 0;
         private double y2 = 0;
         public Line()
         public Line (Point point1, Point point2)
              this.x = point1.getX();
              this.y = point1.getY();
              this.x2 = point2.getX();
              this.y2 = point2.getY();
              this.m = slope(point1, point2);
         public Line (Point point1, double slope)
              this.x = point1.getX();
              this.y = point1.getY();
         public double slope(Point point1, Point point2)//finds slope
              double m1 = (point1.getY() - point2.getY())/(point1.getX() - point2.getX());
              return m1;
         public String toString()
              double temp = this.x- this.x2;
              return this.y + " = " +temp + "" + "(" + this.m + ")" + " " + "+ " + this.y2;
              //y-y1=m(x-x1)
    public class Point2Line
         public static void main(String[]args)
              Point p = new Point(3, -3);
              Point x = new Point(10, 7);
              Line l = new Line(p, x);
              System.out.println(l.toString());
    }My problems:
    I dont have the right outcome due to I don't know how to set up the toString in the Line class.
    I don't know where to put if statements for if the points are the same and you need to prompt the user to put in a different 2nd point
    I don't know where to put in if statements for the special cases such as if the line the user puts in is a horizontal or vertical line (such as x=4.7 or y=3.4)
    Edited by: ta.barber on Apr 20, 2008 9:44 AM
    Edited by: ta.barber on Apr 20, 2008 9:46 AM
    Edited by: ta.barber on Apr 20, 2008 10:04 AM

    Sorry guys, I was just trying to be thorough with the assignment. Its not that if the number is valid, its that you cannot put in the same coordinated twice.
    public class Line
         private double x = 0;
         private double y = 0;
         private double m = 0;
         private double x2 = 0;
         private double y2 = 0;
         public Line()
         public Line (Point point1, Point point2)
              this.x = point1.getX();
              this.y = point1.getY();
              this.x2 = point2.getX();
              this.y2 = point2.getY();
              this.m = slope(point1, point2);
         public Line (Point point1, double slope)
              this.x = point1.getX();
              this.y = point1.getY();
         public double slope(Point point1, Point point2)//finds slope
              double m1 = (point1.getY() - point2.getY())/(point1.getX() - point2.getX());
              return m1;
         public String toString()
              double temp = this.x- this.x2;
              return this.y + " = " +temp + "" + "(" + this.m + ")" + " " + "+ " + this.y2;
              //y-y1=m(x-x1)
    public class Point2Line
         public static void main(String[]args)
              Point p = new Point(3, -3);
              Point x = new Point(10, 7);
              Line l = new Line(p, x);
              System.out.println(l.toString());
    }The problem is in these lines of code.
    public double slope(Point point1, Point point2) //if this method finds the slope than how would i use the the two coordinates plus "m1" to
              double m1 = (point1.getY() - point2.getY())/(point1.getX() - point2.getX());
              return m1;
         public String toString()
              double temp = this.x- this.x2;
              return this.y + " = " +temp + "" + "(" + this.m + ")" + " " + "+ " + this.y2;
              //y-y1=m(x-x1)
         }if slope method finds the slope than how would i use the the two coordinates + "m1" to create a the line in toString?

  • Need help in Object-Relational Mapping

    I'm writing a simple two-tiered business application with Swing application on the client side and a DBMS on the server side. To make my client code more maintainable, I decided to create Business Objects instead of having my client accessing the database directly via SQL. For simplicity, I'm not using any features from the J2EE framework, and the Business Objects will be hosted on the client side, with one-to-one mapping to tables in the database. Since this is my first attempt in Object-Relational Mapping, I'm faced with the following problems:
    1. What kind of methods are appropriate for business objects? For example, if I have a Machine and Employee entity. A Machine is owned by an employee, and this is represented in the DB by storing the employee ID (not the name) as a foreign key in the Machine table. Let's say in the user interface I have a table that needs to display the list of Machines, but instead of displaying the owner employee's ID, I want to display the owner employee's name by doing a join select. Should the findMachines() method always perform a join select to get owner's name and store it in the Machine object which is returned, or should findMachines() simply return the owner's ID so the UI will need to make another SQL call (through the Employee object) to get the employee's name? The latter is more elegant, but would it be horribly inefficient if there are lots of machines to be displayed (and for each machine we make a separate select call to get the owner's name).

    Business objects should be separate from how they're persisted.
    When you say object-relational mapping, do you mean a tool like Hibernate? Or are you writing your own persistence layer using JDBC and SQL?
    I'd recommend that you read about the Data Access Object pattern and keep the persistence code out of the business objects themselves:
    http://java.sun.com/blueprints/corej2eepatterns/Patterns/DataAccessObject.html
    url=http://www-106.ibm.com/developerworks/java/library/j-dao/

  • Need help placing tracking script on button click

    Howdy.
    We're trying to track the button clicks on a landing page we're producing. I've got the "landing page" script in the header via the page properties but now I need to put script on a button that fires when the person clicks the button. Any help would be greatly appreciated!
    website: maysweb.tamu.edu/open-enrollment
    script:
    <script type='text/javascript'>
    // Conversion Name: Finance & Accounting - Non-Finance Managers button
    var ebRand = Math.random()+'';
    ebRand = ebRand * 1000000;
    //<![CDATA[
    document.write('<scr'+'ipt src="HTTP://bs.serving-sys.com/Serving/ActivityServer.bs?cn=as&ActivityID=1&rnd=' + ebRand + '"></scr' + 'ipt>');
    //]]>
    </script>
    <noscript>
    <img width="1" height="1" style="border:0" src="HTTP://bs.serving-sys.com/Serving/ActivityServer.bs?cn=as&ActivityID=1&ns=1"/>
    </noscript>

    Anyone got any ideas on this?

  • CAF-GP: Need help restoring objects from trash

    Hi All,
    I've accidentally deleted a whole lot of development objects from GP Design Time (most of them from Life and Work Events - US folder), unaware of copying as copies and references. I spent hours restoring almost all of them to their original folders except for a few.
    Could someone please help me identify, with the help of a reference portal, the original location of the following objects - as to where they belong in Public Folders?
    Please find a screenshot of my trash here.
    http://www.sendspace.com/file/omdo3o
    I greatly appreciate any help. Please let me know if more info is required.
    Cheers,
    Rajit

    I could restore most of the objects to their locations except some of them I believe to be copies.

  • Need help regarding Objects ...

    hi All,
    I am new in SAP so kinda struggling however i've been learning alot with your posts & replies.. hope my query will help someone else too. My issue is
    I've created an Object class using SU21, say name of the object class: Z_12 & in that i've created an object called Z_Test. Now i wanna know how do i put transactions in this particular Object.
    Eagerly waiting for ur response !!
    regards,
    Manji

    Hi Sham,
    Transaction can be secured in two ways.
    --> using the default s_tcode check
    --> By assigning an auth.object to the transaction.
    Goto Se93--> enter the transaction code and click on the change button and assign the auth.object in the auth.object field.
    Regards,
    Ashok

  • Need help in linking two JPanels

    Hi I created a JFrame with layeredpane and I am unable to link the center JPanel to an external JPanel.
    private javax.swing.JButton jButton1;
        private javax.swing.JButton jButton2;
        private javax.swing.JPanel jPanel1;
        private javax.swing.JPanel jPanel2;
        private javax.swing.JPanel jPanel3;
        private javax.swing.JPanel jPanel4;
        private javax.swing.JScrollBar jScrollBar1;
        private javax.swing.JScrollBar jScrollBar2;
        private javax.swing.JScrollBar jScrollBar3;
        private javax.swing.JScrollBar jScrollBar4;
        private javax.swing.JTextField jTextField1;
        private javax.swing.JTextField jTextField2;
        private javax.swing.JTextField jTextField3;
        private javax.swing.JTextField jTextField4;
    public NewJFrame() {
      initComponents();
            jPanel4 = new NewAppletX ();
    }New AppletX
        public NewAppletX(){
          JButton jb=new JButton("test button");
          this.add(jb);
          this.setVisible(true);
        }The problem is test button doesnt show up in the screen..
    can some one help

    It looks like Netbeans generated code, so only the good lord knows. To the original poster: if you want to understand Swing, ditch the code-generation functions of Netbeans and learn to code it on your own. The Sun Java Swing tutorials are a great place to start. Otherwise you'll be fumbling in the dark. Start here:
    http://java.sun.com/docs/books/tutorial/uiswing/index.html

  • Need help placing images

    Hey everybody hows it going? Any help you could give me would
    be greatly appreciated!
    Here is my problem. I am working off a template and have been
    able to do everything I want so far but ive run into a problem.
    Check my site to follow along
    Shine Media House (Click
    Here). Whenever the user clicks on About, Services or Contact a
    random image appears along with the background on the corresponding
    page. I need to be able to link it to a specific image. I found the
    action for the random sequence and it reads as follow,
    (_root.link !== 3) {
    _root.pic_num = (Math.ceil(Math.random()*105));
    Anybody know a way to fix my problem? It probably is really
    simple I just have no clue.
    Any help would be greatly appreciated!!!

    This is a perfect answer. I am now able to specify what
    number image from an array of images. Now, is there a way to
    specify different photos for the three different buttons?
    I am thinking that is what the
    if (_root.link !== 3)
    piece is about.
    Any thing would be great!!!
    Thanks!
    I can post the fla file somewhere if that would help!

  • Need help placing files into Illustrator, Indesign and opening in Photoshop

    For some reason Illustrator and Indesign CS2 won't go further than the iPhoto Library icon in my "place files" window and Photoshop won't go further than that either when opening files. This was not a problem with the previous version of iPhoto. Exporting singular photos is a pain in the rear, as I use hundreds of photos for my website and advertising. Is there something simple I'm missing?

    This may be of some help:
    Using Photoshop (or Photoshop Elements) as Your Editor of Choice in iPhoto.
    1 - select Photoshop as your editor of choice in iPhoto's General Preference Section's under the "Edit photo:" menu.
    2 - double click on the thumbnail in iPhoto to open it in Photoshop. When you're finished editing click on the Save button. If you immediately get the JPEG Options window make your selection (Baseline standard seems to be the most compatible jpeg format) and click on the OK button. Your done.
    3 - however, if you get the navigation window that indicates that PS wants to save it as a PS formatted file. You'll need to either select JPEG from the menu and save (top image) or click on the desktop in the Navigation window (bottom image) and save it to the desktop for importing as a new photo.
    This method will let iPhoto know that the photo has been editied and will update the thumbnail file to reflect the edit..
    NOTE: With Photoshop Elements 6 the Saving File preferences should be configured: "On First Save: Save Over Current File". Also I suggest the Maximize PSD File Compatabilty be set to Always.
    If you want to use both iPhoto's editing mode and PS without having to go back and forth to the Preference pane, once you've selected PS as your editor of choice, reset the Preferences back to "Open in main window". That will let you either edit in iPhoto (double click on the thumbnail) or in PS (Control-click on the thumbnail and seledt "Edit in external editor" in the Contextual menu). This way you get the best of both worlds
    2 - double click on the thumbnail in iPhoto to open it in Photoshop. When you're finished editing click on the Save button. If you immediately get the JPEG Options window make your selection (Baseline standard seems to be the most compatible jpeg format) and click on the OK button. Your done.
    3 - however, if you get the navigation window that indicates that PS wants to save it as a PS formatted file. You'll need to either select JPEG from the menu and save (top image) or click on the desktop in the Navigation window (bottom image) and save it to the desktop for importing as a new photo.
    This method will let iPhoto know that the photo has been editied and will update the thumbnail file to reflect the edit..

Maybe you are looking for