Add height to comps?

Especially with the web... is but - possible to increase the height of a page layout?

For example, I make a landing page and decide to add some elements. These additions require a highest page.

I can't understand how, or if there is a way to do this...

Any help is appreciated!

TX

Andrew

Hi Turner111,

It is not currently possible in Comp... It is, however, an often requested feature (especially web developers/designers). Unfortunately, I did not if the feature could go to a future update.

I'll pass your comments along to the product team.

Sue.

Tags: Adobe Comp CC

Similar Questions

  • Get the error (23::46) when you add effects to comp

    Hi all

    If I try to add effects like text > numbers or obsolete - text base of a solid in my computer, I get the following error message "effects error: could not convert Unicode characters.» I did some research on this and found people who had the same problem when you try to import images or images. I get the message while starting a new layout, adding a solid and then try to add the effects mentioned above, there are no images or image in question here.

    I am running Win7 Professional 64-bit service pack 1 (English) and after effects CC (12.2.1.5). I don't think that this is part of the problem but here's more info (just in case) material:

    -NVIDIA GTX 570

    -Intel Core i7 2600K

    -16 GB DDR3 Corsair (CMZ16GX3M4A1600C9)

    -ASUS P8P67 Mainboard

    I'm under AE cc on a Lenovo U310 also and have any problems, so I guess something must be wrong with the operating system or AE on my main PC. Does anyone have an idea, what the problem?

    I am happy of all suspicion.

    Thank you Michael

    Perhaps it is by default a font that has problems on this particular machine. The program crash completely or this error popping up just one mind?

  • When I add my composition to Adobe Media Encoder from After Effects, it makes it wrong?

    How is it that when I add my composition directly effects to adobe media encoder, it makes out of adobe media encode correctly? I mean, here the video fate a bit scrambled pieces of it overlap other parts. Is this a problem with "dynamic link"? I did something wrong? I work in CC.

    I think you fail to understand what is said. When you add one composition to another, add a composition with a red background for a composition with a blue background, red background goes away and the blue background is preserved, not vice versa. Select the transparency grid and you will see the blue background disappears and you see the transparency. It has always been this way since you were able to select a color background in AE there nearly 20 years.

    When you render a lossless without alpha format and the color is defined prior multiplied (red in your example) background color is multiplied with the alpha pre giving you a red background in your render lossless. If you add your Main Comp to the TEA and you have no option for pre multiply the alpha channel, so it is ignored and you end up with a black background. If you change the output settings in the SOUL to something like JPEG 2000 and 32-bit or 32-bit PNG, you will get a straight alpha channel, the industry standard, and a black background. If you choose a codec which does not support alpha channels, you get just a black background.

    I guess what I'm trying to say is that everything works exactly as it was designed to work, and the only reason why you found the red background of your comps background color when you return a lossless with alpha multiplied pre, is that the background color is meadow multiplied with the bottom. In a normal production pipeline it is assumed you want to preserve the transparency throughout the production process. Multiplying the background color is useful in a scenario very little. More than 40 years the realization of films and creating special effects and composites (yes I did in a lab with the movie) I have never used an alpha pre multiplied with a background colored except in a situation of class in order to demonstrate that it is. Here's how you can see with a multiplied pre alpha is. :

    Rotate your model nested 30º in order to have some aliasing then try rendering your comp with the lossless with alpha preset and keep premultiplied lit for the alpha channel. Look carefully at the embattled edges and you will see a red mixed in on the edges. You can also use the lossless and then restore an alpha only, together the alpha only made as matte to make without loss and you will see the Red edges once again. Use straight alpha and the edges disappear. Here is this that rendered Lossless with alpha and multiplied pre gives you.

    So, assuming you still want to maintain complete transparency in the production pipeline that everything works as it should with one exception, the settings default lossless with alpha should probably be for default rendering right alpha then people who are not familiar with the use of alpha channels and a standard production pipeline would not be caught. As I said in the first place, this isn't a bug, it is normal for a production pipeline. Do not understand how AE or any other composition app handles alpha channels, that's what attracted to you. If you want a background color, add a solid. The only reason forever the background color of a black everything except model value is for those rare occasions where you might want to throw some color in the alpha edges.

  • Auto setting height of Wrapper

    Hello, I would like to create a wrapper to host my entire Web site which I think is a common practice. The problem happens with the height of it. I wish I had my size wrappers (which will contain all my other div) automatically adjust when I add or remove the div is - it possible? I tried setting the height of the wrapper Auto and Auto 0.

    Thanks for any help you can provide.

    Wrapper height is automatically determined by the content inside. You need not add height.  If your wrapper contains floating elements, add overflow: hidden of CSS of your wrapper to prevent the collapse of the margin.

    http://colinaarts.com/articles/the-magic-of-overflow-hidden/

    Nancy O.

  • How to do everything appear entirely on the screen?

    Can someone explain how to get my grid of liquid in the container so that everything arises entirely on the screen? Bootstrap lessons do not explain how to do this. I'm working in Dreamweaver CS6. Also, I see that the Bootstrap has tables. These environments are sensitive?

    In the CSS code, there are 3 types of selectors we use to style page elements:

    1 tags HTML like h1, h2, p, table, ul, li, etc...

    2 reusable classes prefixed by a point, .className (can be used as often as needed)

    3. unique ID prefixed by the hash tag #, #ID (can be used only 1 time per page)

    Bootstrap has several pre-built, class names that we can use to style things.  To the top of the nav page, I used nav-pills Bootstrap, which are easier for users to access on touchscreens.

    My images are just placeholders for lorempixel.com.  The shown banner is 1900 x 200 and the thumbnails are 150 x 150.  They refresh with different images each time because they come from this web site.  Don't worry about this.  Your images do not.

    You need to size your images appropriately in your graphics editor before their insertion into web pages.  DO NOT ADD height or width attributes because they will be 100% default max-width.

    Engines search and screen readers cannot 'see' images of the text.  If you do not want spotted humans to 'see' important text to add a single sr class for it. SR only = visible to screen readers only.

    class = "sr only"> Your Site Name

    Nancy O.

  • Position change of composition

    Hi, I would like to ask how to change the position of the composition. Little about my program, first of all I have add some screen (comp) the entire screen position even, but when adding another screen, I re - positioned all over the about screen closely. Some images of my program.

    122.png

    123.png

    Your "screens" are compositions that you want to use as layers (precomps) inside another composition, right?

    Then you can change their position as long as the position of any other layer with something like

    var myPosition = [500,1000];
    myComp.layer("Screen 2").property("ADBE Transform Group").property("ADBE Position").setValue(myPosition);
    
  • Do not stretch the fluid grid header image

    The grid of fluid image (hero div) meets the mobile and Tablet level queries, but not at the office 1232 px.

    Image develops only for a max of 1125 px of 1540 px for the nav main div, which is 73%.

    the CSS code is as follows for the desktop mode:

    / * Office Layout: 769px to a maximum of 1232px.  Inherits the styles of: Mobile and tablet. */

    @media only screen and (min-width: 769px) {}

    {.gridContainer}
    Width: 88.7142%;
    Max-width: 1232px;
    padding-left: 0,6428%;Capture 030515.JPG
    padding-right: 0,6428%;
    margin: auto;
    Clear: none;
    float: none;
    left margin: auto;
    }
    #top {}
    }
    {#mainNav}
    }
    {#menuSystem}
    }
    .menuItem {}
    Width: 13.0434%;
    Clear: none;
    margin left: 1.4492%;
    }

    Any suggestions how I can develop and stretch the image to the same width as the main nav (7 horizontal buttons) in the fluid grid container?

    If the value of 88.7142% should be increased to 100%, why then the image only develops to 73% and not of 88.7142%

    URL is < tyndall.net.au >

    Any suggestions greatly appreciated.

    Thank you

    Jonathan

    By default, FGLayout sets the images with a maximum width of 100%. The image can resize up to its native file size but not more.

    To do this, your image must be at least as wide as the layout of office max AND you should not add height or width attributes to the image itself.

    your banner

    Nancy O.

  • SOUL CC2014 wants to encode anything

    Hello world!

    CC014 SOUL wants to encode nothing! It opens, adds the files (Comps), presets are changed, everything perfect I try to start the encoding: when I press 'Start encoding' nothing changes at all, none of the actions/encoding/nothing! Encoding launches automatically only in the case of the folder with the files/comps is added in the selected records 'spyware' and so 'files automatic watch - encode'.

    Any ideas, please?

    Looks like at Re: SOUL start queue after Re-installing on the new MacBook Pro

  • Set the size of the image in an interactive report


    Hello

    I'm under APEX 4.1 on Oracle 11 g.  I'm trying to resize images in the infrared or a classic report to 100px x 100px.  The images are different, but all dimensions bigger than the size I want to display.  The images are stored images as.jpg, and I need to access it via a URL.  I have this in my select statement: "< img src =https://aaa.bbbbb.edu:10056/inbpics/' |" ' " I00 | substr (spriden_id, 5, 5) | '. JPG > ' pic and it tries to display the image, but it displays the image at its original size.  I try to add the values for height and width in the query, as: "< img src =https://rand.wvnet.edu:10056/inbpics/' |" ' " I00 | substr (spriden_id, 5, 5) | '. Height JPG width 100 = 100 = > ' pic but the image is not displayed because it adds height = 100 at the end of the path to the image.

    I know I could create thumbnails of images, but there are thousands of images with more added constantly, and it would be too much work to try to catch up.

    Is there a way to set the height and width of an image in a report?

    Thank you

    Bob

    Hello

    Modify your query to include 'class' for images.

    'https://aaa.bbbbb.edu:10056 / inbpics /' | 'I00 ' | substr (spriden_id, 5, 5) | '. JPG > '

    Now put after the CSS in the HTML Page header or page footer.

    Kind regards

    Hari

  • Why my background image isn't appearing?

    I want to have a background image for my central section. so I made the background of this image in my css. but the image will not be displayed. what I am doing wrong? Thank you

    http://www.mamacinis.com/

    Sorry my mistake,

    I meant to keep the rest (height, etc.). So what you have now, add height, not width need because by default is 100%

  • Set XML attributes to multiply items

    Hello world

    This is my situation. I have a document with multiple pages and multiple objects on each page.

    now, I want to get the coordinates and dimensions of an object and write the data as an XML attribute.

    The script should do this for each object in my document.

    That's what I got so far:

    function creatAtt() {}

    for (var i = 0; i < app.selection.length; i ++) {}

    var myObject = app.selection [i];

    var myXMLobject = myObject.associatedXMLElement;

    var ycoords = myObject.geometricBounds [0];

    var xcoords = myObject.geometricBounds [1];

    var width = myObject.geometricBounds [3] - myObject.geometricBounds [1];

    var height = myObject.geometricBounds [2] - myObject.geometricBounds [0];

    myXMLobject.xmlAttributes.add ("Y-coordinate", ycoords.toString () + "px");

    myXMLobject.xmlAttributes.add ("X-coordinate", xcoords.toString () + "px");

    myXMLobject.xmlAttributes.add ("Width", width.toString () + "px");

    myXMLobject.xmlAttributes.add ('Height', height.toString () + "px");

    }

    }

    creatAtt();

    When I select an object and run the script he writes only the data for the selected object, not for all objects. Someone a tip how to fix?

    Hi Sebbomatico,

    Now, I remove the attributes at the beginning and after I generated. Please check this code and the snapshot.

    var myDoc= app.activeDocument;
    var myPages = myDoc.pages;
    for (var i = 0; i < myPages.length; i++){
        var myActualPage = myPages[i].pageItems;
        for (var j = 0; j < myActualPage.length; j++){
           var myObject= myActualPage[j];
           var myXMLobject = myObject.associatedXMLElement;
           var ycoords= myObject.geometricBounds[0];
           var xcoords= myObject.geometricBounds[1];
           var width = myObject.geometricBounds[3] - myObject.geometricBounds[1];
           var height = myObject.geometricBounds[2] - myObject.geometricBounds[0];
           try{myXMLobject.xmlAttributes.everyItem().remove();}catch(e){};
           myXMLobject.xmlAttributes.add ("Y-Koordinate", ycoords.toString() + " px");
           myXMLobject.xmlAttributes.add ("X-Koordinate", xcoords.toString() + " px");
           myXMLobject.xmlAttributes.add ("Width", width.toString() + " px");
           myXMLobject.xmlAttributes.add ("Height", height.toString() + " px");
           }
        }
    

  • Image display problems small basket

    Hello everyone. I struggled to display the image in my basket. I know that the image is there, but it will not display. Any help would be appreciated. Thank you

    http://www.highestgoodclothing.com/men/STL-tee

    {.productitemcell}

    In your css having no height.

    Add height: auto; to your code.

  • Error won't let me go to another class (has got me pulling out my hair)

    Good buddies, so basically I have 2 buttons in the mainfraime class. The first button leads to the candidate page and the second page of voters. The first button works and redirects the user to the PasswordDemo page, but to the hell out of me I can't understand why he refuses to acknowledge the 'profile' class as its supposed to go to when the user clicks the second button. He keeps telling me that "the Profile() method is not defined for the Mainframe type. Help, please.

    Class mainframe:
    //The applications first or the main frame
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    
    public class Mainframe extends JFrame {
    
            private JButton myFirstButton;
            private JButton mySecondButton;
            private javax.swing.JButton jButton1;
            private javax.swing.JButton jButton2;
            private javax.swing.JLabel jLabel1;
            private javax.swing.JLabel jLabel2;
            private javax.swing.JLabel jLabel3;
    
            // Constructor for a new frame
    
            public Mainframe() {
    
                    super("Welcome Page");
                    
                    
    
                    myFirstButton = new JButton("Contestant");
                    myFirstButton.setFont(new Font( "Arial", Font.BOLD, 18));
                    myFirstButton.setBackground(Color.red);
    
                    mySecondButton = new JButton("Voter");
                    mySecondButton.setFont(new Font( "Arial", Font.BOLD, 18));
                    mySecondButton.setBackground(Color.ORANGE);
    
                    Container c = getContentPane();
                    FlowLayout fl = new FlowLayout(FlowLayout.LEFT);
                    c.setLayout(fl);
    
                    c.add (myFirstButton);
                    c.add (mySecondButton);
    
                    ButtonHandler handler = new ButtonHandler();    //creation of a new Object
                    myFirstButton.addActionListener(handler);          // Attach/register handler to myFirstButton
                    mySecondButton.addActionListener(handler);        //Attach/register handler to mySecondButton
    
                    setSize(400, 300);
                    show();
                    
           
            
            }
    
    
            public static void main(String [] args) {
    
                    // Make frame
                    Mainframe f = new Mainframe();
    
                    f.addWindowListener(
                            new WindowAdapter() {
                                    public void windowClosing(WindowEvent e) {
    
                                            // This closes the window and terminates the
                                            // Java Virtual Machine in the event that the
                                            // Frame is closed by clicking on X.
                                            System.out.println("Exit via windowClosing.");
                                            System.exit(0);
                                    }
                            }
                    );
            } // end of main
    
            // inner class for button event handling
            private class ButtonHandler implements ActionListener {
                    public void actionPerformed(ActionEvent e) {
                            if (e.getSource() == myFirstButton) {
                            
                                 PasswordDemo inputForm = new PasswordDemo();
                                    //inputForm.setVisible(true);
                                    
                                    try
                                    {
                                    PasswordDemo.createAndShowGUI();
                                    inputForm.setVisible(false);
                                    }
                                    
                                    catch(Exception d)
                                    {
                                         
                                    }
                                   // new PasswordDemo();
                            }
                            if (e.getSource() == mySecondButton) {
                                 
                           //     Profile p = Profile();
                                
                           //     p.setVisible(true);
                                  
                           }
                    }       
            }
            
            public void actionPerformed (ActionEvent e)
            {
                String cmd = e.getActionCommand();
    
                if (mySecondButton.equals(cmd)) {
                     boolean success=true; 
                     if(success)
                     {
                     Profile p = Profile();
                    
                       p.setVisible(true);
                
                     }
                     
                }
    
            
          //  private void mySecondButtonActionPerformed(java.awt.event.ActionEvent evt)
        //    {
         //        Profile p = Profile();
                
         //       p.setVisible(true);
         //   }
    
            
    } // end of outer class
    }
    Profile class:
    import java.awt.event.ActionListener;
    import java.sql.*;
    
    public class Profile extends javax.swing.JFrame {
    
        public Profile() {
            initComponents();
        }
    
        @SuppressWarnings("unchecked")
    
        private void initComponents() {
    
            titleLabel = new javax.swing.JLabel();
            nameAccess = new javax.swing.JLabel();
            ageAccess = new javax.swing.JLabel();
            heightAccess = new javax.swing.JLabel();
            weightAccess = new javax.swing.JLabel();
            lastNameAccess = new javax.swing.JLabel();
            descriptionAccess = new javax.swing.JLabel();
            nameLabel = new javax.swing.JLabel();
            lastNameLabel = new javax.swing.JLabel();
            ageLabel = new javax.swing.JLabel();
            heightLabel = new javax.swing.JLabel();
            weightLabel = new javax.swing.JLabel();
            descriptionLabel = new javax.swing.JLabel();
    
            setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    
            titleLabel.setFont(new java.awt.Font("Gungsuh", 1, 18)); // NOI18N
            titleLabel.setText("\"User\"'s Profile");
    
            nameAccess.setText("Name: ");
            nameLabel.setText("");
            
            lastNameAccess.setText("Last Name: ");
            lastNameLabel.setText("");
    
            ageAccess.setText("Age: ");
            ageLabel.setText("");
    
            heightAccess.setText("Height: ");
            heightLabel.setText("");
            
            weightAccess.setText("Weight: ");
            weightLabel.setText("");
            
            descriptionAccess.setText("Description: ");
            descriptionLabel.setText("");
            
            javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
            getContentPane().setLayout(layout);
            layout.setHorizontalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(layout.createSequentialGroup()
                    .addContainerGap()
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addComponent(titleLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 246, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGroup(layout.createSequentialGroup()
                            .addComponent(nameAccess)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(nameLabel))
                        .addGroup(layout.createSequentialGroup()
                            .addComponent(lastNameAccess)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(lastNameLabel))
                        .addGroup(layout.createSequentialGroup()
                            .addComponent(ageAccess)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(ageLabel))
                        .addGroup(layout.createSequentialGroup()
                            .addComponent(heightAccess)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(heightLabel))
                        .addGroup(layout.createSequentialGroup()
                            .addComponent(weightAccess)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(weightLabel))
                        .addGroup(layout.createSequentialGroup()
                            .addComponent(descriptionAccess)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(descriptionLabel)))
                    .addContainerGap(151, Short.MAX_VALUE))
            );
            layout.setVerticalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(layout.createSequentialGroup()
                    .addContainerGap()
                    .addComponent(titleLabel)
                    .addGap(13, 13, 13)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(nameAccess)
                        .addComponent(nameLabel))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(lastNameAccess)
                        .addComponent(lastNameLabel))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(ageAccess)
                        .addComponent(ageLabel))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(heightAccess)
                        .addComponent(heightLabel))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(weightAccess)
                        .addComponent(weightLabel))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(descriptionAccess)
                        .addComponent(descriptionLabel))
                    .addContainerGap(139, Short.MAX_VALUE))
            );
    
            pack();
        }// </editor-fold>
    
        /**
         * @param args the command line arguments
         */
        
        public static void main(String args[]) {
            java.awt.EventQueue.invokeLater(new Runnable() {
    
                public void run() {
                    new Profile().setVisible(true);
                }
            });
        }
        // Variables declaration - do not modify
        private javax.swing.JLabel ageAccess;
        private javax.swing.JLabel ageLabel;
        private javax.swing.JLabel descriptionAccess;
        private javax.swing.JLabel descriptionLabel;
        private javax.swing.JLabel heightAccess;
        private javax.swing.JLabel heightLabel;
        private javax.swing.JLabel lastNameAccess;
        private javax.swing.JLabel lastNameLabel;
        private javax.swing.JLabel nameAccess;
        private javax.swing.JLabel nameLabel;
        private javax.swing.JLabel titleLabel;
        private javax.swing.JLabel weightAccess;
        private javax.swing.JLabel weightLabel;
        // End of variables declaration
    }
    Class PasswordDemo:
    import javax.swing.*;
    import java.sql.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.util.Arrays;
    import java.net.*;
    import java.io.*;
    import java.util.Scanner;
    
    public class PasswordDemo extends JPanel
                              implements ActionListener  {
        private static String OK = "ok";
        private static String HELP = "help";
        private static String Register = "Register";
    
        private JFrame controllingFrame; //needed for dialogs
        private JTextField username;
        private JPasswordField passreg;
        private JTextField usernamefield;
        private JPasswordField passwordField;
    
        private javax.swing.JButton jButton1;
        private javax.swing.JButton jButton2;
    
        private JTextField name;
        private JTextField age;
        private JTextField height;
        private JTextField weight;
    
     private javax.swing.JPanel jPanel1;
    
        private void gothere() {
    
                      JFrame f = new JFrame("This is a test");
                      f.setSize(400, 300);
                      Container content = f.getContentPane();
                      content.setBackground(Color.white);
                      content.setLayout(new FlowLayout());
                     // content.add(new JButton("Button 1"));
                      //content.add(new JButton("Button 2"));
                      //
    
    
    
             name = new JTextField("Please put your name here", 20);
              name.setFont(new Font("Serif", Font.PLAIN, 14));
              content.add(name);
    
              age = new JTextField("Please put your age here", 20);
              age.setFont(new Font("Serif", Font.PLAIN, 14));
              content.add(age);
    
              height = new JTextField("Please indicate your height here", 20);
              height.setFont(new Font("Serif", Font.PLAIN, 14));
              content.add(height);
    
              weight = new JTextField("Please indicate your weight here", 20);
              weight.setFont(new Font("Serif", Font.PLAIN, 14));
              content.add(weight);
    
              content.add(new JButton("Submit"));
    
    
               f.setVisible(true);
        }
    
    
         public PasswordDemo(JFrame f) throws Exception {
            //Use the default FlowLayout.
            controllingFrame = f;
    
            //Create everything.
            usernamefield = new JTextField(10);
            usernamefield.setActionCommand(OK);
            usernamefield.addActionListener(this);
    
            passwordField = new JPasswordField(10);
            passwordField.setActionCommand(OK);
            passwordField.addActionListener(this);
    
            passreg = new JPasswordField(10);
            passreg.setActionCommand(Register);
            passreg.addActionListener(this);
    
            username = new JTextField("This is a sentence", 20);
            username.setActionCommand(Register);
            username.addActionListener(this);
    
            JLabel reg = new JLabel("If you are a new contestant please register: \n");
            JLabel user = new JLabel("Username: \n");
            user.setLabelFor(username);
            JLabel pass = new JLabel("Password: \n");
            user.setLabelFor(passreg);
    
    
            JLabel label = new JLabel("Enter your username and password to log in: ");
            label.setLabelFor(usernamefield);
            label.setLabelFor(passwordField);
    
            JComponent buttonPane = createButtonPanel();
    
            //Lay out everything.
            JPanel textPane = new JPanel(new FlowLayout(FlowLayout.TRAILING));
            textPane.add(reg);
            textPane.add(user);
            textPane.add(pass);
            textPane.add(username);
            textPane.add(passreg);
    
            textPane.add(label);
            textPane.add(usernamefield);
            textPane.add(passwordField);
    
    
    
            add(textPane);
            add(buttonPane);
        }
    
        public PasswordDemo() {
              // TODO Auto-generated constructor stub
         }
    
    
         protected JComponent createButtonPanel() {
            JPanel p = new JPanel(new GridLayout(0,1));
            JButton okButton = new JButton("OK");
            JButton helpButton = new JButton("Help");
    
            JButton regButton = new JButton("Register");
    
            okButton.setActionCommand(OK);
            helpButton.setActionCommand(HELP);
            regButton.setActionCommand(Register);
            okButton.addActionListener(this);
            helpButton.addActionListener(this);
            regButton.addActionListener(this);
    
            p.add(okButton);
            p.add(helpButton);
            p.add(regButton);
    
            return p;
        }
    
        public void actionPerformed (ActionEvent e)
        {
            String cmd = e.getActionCommand();
    
            if (OK.equals(cmd)) { //Process the password.   
    
                boolean success=true;                        //Sign In
    
                 String Username="";
                 String Password="";
                 
                 Username = this.usernamefield.getText();
                 Password = this.passwordField.getText();
    
                 try
                 {
                     success=check2(Username,Password);
                }
    
                 catch(Exception d)
                 {
                      System.out.println("Got out");
    
                 }     
    
    
                 if(success)
                 {
                 JOptionPane.showMessageDialog(controllingFrame, "Sign in Successful");
                 
                 
                 Form F = new Form(Username);
                 
                 F.setVisible(true);
                 
                 
                 }
                 else
                 JOptionPane.showMessageDialog(controllingFrame, "Sign in was unsuccessful");     
    
            }
    
            else if(HELP.equals(cmd)) { //The user has asked for help.
                JOptionPane.showMessageDialog(controllingFrame,
                    "You can get the password by searching this example's\n"
                  + "source code for the string \"correctPassword\".\n"
                  + "Or look at the section How to Use Password Fields in\n"
                  + "the components section of The Java Tutorial.");
            }
    
            else if(Register.equals(cmd)) {  //*****************************************************
                 boolean success=true;
    
                 String Username="";
                 String Password="";
    
    
    
                 Username = this.username.getText();
                 Password = this.passreg.getText();
    
    
    
                 try
                 {
                      success=check(Username,Password);
                 }
    
                 catch(Exception d)
                 {
                      System.out.println("Something bad happened");
    
                 }
    
    
                 if(success)
                 JOptionPane.showMessageDialog(controllingFrame, "Registration successful");
    
                 else
                 JOptionPane.showMessageDialog(controllingFrame, "Registration was unsuccessful");
    
    
            }
        }
    
        //Must be called from the event dispatch thread.
        protected void resetFocus() {
            passwordField.requestFocusInWindow();
        }
    
        static void createAndShowGUI() throws Exception {
            //Create and set up the window.
            JFrame frame = new JFrame("Registration Page");
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    
            //Create and set up the content pane.
            final PasswordDemo newContentPane = new PasswordDemo(frame);
            newContentPane.setOpaque(true); //content panes must be opaque
            frame.setContentPane(newContentPane);
    
            //Make sure the focus goes to the right component
            //whenever the frame is initially given the focus.
            frame.addWindowListener(new WindowAdapter() {
                public void windowActivated(WindowEvent e) {
                    newContentPane.resetFocus();
                }
            });
    
            //Display the window.
            frame.pack();
            frame.setVisible(true);
        }
        public static void main(String args[]) {
            //Schedule a job for the event dispatch thread:
            //creating and showing this application's GUI.
            SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    //Turn off metal's use of bold fonts
              UIManager.put("swing.boldMetal", Boolean.FALSE);
              try{
              createAndShowGUI();
              }
    
                catch(Exception e)
                {
    
                }
                }
                     });
                 }
    
        public void sendUserPass(String user,String pass)throws Exception
        {
    
             //Send request
    
    
             Class.forName("com.mysql.jdbc.Driver");
    
              Connection con = DriverManager.getConnection("jdbc:mySql://localhost:3306/Contest","root","");
    
              System.out.println("connected :D:D:D:D");
    
              PreparedStatement state = con.prepareStatement("Insert Into Contestant (USERNAME,PASSWORD) values ('"+user+"','"+pass+"')");
    
              state.executeUpdate();
    
              /*while(Result.next())
              {
                   System.out.println(Result.getString(1)+"\t"+Result.getString(2));
    
              }*/
    
              //server should reply by updating database
        }
    
    
        public boolean check(String user,String pass)throws Exception
        {
    
             //Send request
             Socket Sock = new Socket ("LocalHost",5000);
             
             DataOutputStream toServer = new DataOutputStream(Sock.getOutputStream());
             BufferedReader buff = new BufferedReader(new InputStreamReader(Sock.getInputStream()));
             
             String sentence="";
             
             toServer.writeBytes("1\n");
             
             sentence=buff.readLine();
             
             System.out.println(sentence+"\n");
             
             toServer.writeBytes(user+" "+pass+"\n");
             
             String answer="";
             
             answer = buff.readLine();
             
             if(answer.equals("No"))
                  return false;
             
             return true;
      
             /*Class.forName("com.mysql.jdbc.Driver");
    
              Connection con = DriverManager.getConnection("jdbc:mySql://localhost:3306/Contest","root","");
    
              System.out.println("connected :D:D:D:D");
    
              PreparedStatement state = con.prepareStatement("Select Username From Contestant where '"+user+"'= username");
    
              ResultSet Result = state.executeQuery();
    
              if(!Result.next())
              return true;*/
    
              
    
              //server should reply by updating database
        }
        
        
        public boolean check2(String user,String pass)throws Exception
        {
             Socket Sock = new Socket("localhost",5000);
             
             DataOutputStream toServer = new DataOutputStream (Sock.getOutputStream());
             BufferedReader buff = new BufferedReader(new InputStreamReader(Sock.getInputStream()));
             
             toServer.writeBytes("2\n");
             
             System.out.println("Well I sent the message");
             
             String sentence = buff.readLine();
             
             toServer.writeBytes(user+" "+pass+"\n");
             
             System.out.println(sentence);
             
             sentence=buff.readLine();
             
             System.out.println(sentence+"\n");
             
             
             if(sentence.equals("No"))
                  return false;
             
             return true;
        }
    
    
    }
    Profile p = Profile();
    

    Who says "call a 'Profile' method name that is defined in the current class"

    Maybe what you mean is:

    Profile p = new Profile();
    

    who says "create a new instance of the profile class and invoke its no. - arg constructor."

  • Text in centered DIV horizontally and vertically.

    I made a bar of simple navigation at the bottom of a site that I am building and had it centered horizontally and vertically.  When I pulled the top of the page now the text is completely to the left and I had no problem with him the day before. I made no changes to the code. I use IE9, but I've been since I started this site. Everything looks fine in Firefox. If I approached IE9 compatibility mode, it is centered horizontally but not vertically. Any ideas?

    http://www.toddsshowcase.com/

    http://www.toddsshowcase.com/styles/stylesheet.CSS

    Just add height: 90px; and line-height: 90px; to your 'bottom_menu' of the selector css (as shown below)

    {#bottom_menu}
    text-align: center;
    Width: 974px;
    margin: 0px auto;
    Clear: both;
    height: 90px;
    line-height: 90px;
    }

    Normally, I would not recommend the definition of a height on a

    that contains text, BUT in this case there are many possibilities be accommodated the text should zoom to the end user in two or three times.

  • CSS for a rollover sprite

    Here's a CSS issue.

    I want to use a small icon next to a link and have this change of icon when the link is hovered over.  I have it set in place with a little Pixie:

    http://Phyllis.fellowshipx.org/spriteicon.html

    Question: Is my CSS good on it?  It seems to work, but I wonder if it'll cause problems anywhere.  Should I be declaring a height?

    Also, when I click on this link in Firefox, it's a very wide selection rectangle.  Should I be declaring a width?  I am worried about registering a width/height, since my policy is located in ems (and I guess this could develop and create problems?).

    I think it works very well, but wanted to know if anyone has any suggestions on the best ways to write code for it.

    Thank you, Phyllis

    Seems good.  You can add height & width in ems without penalty.

    / * This applies to all connection States * /.

    a: {enlargeicon}
    Width: 8th;
    height: 1.5em;
    background-image: url (enlarge.gif);
    background-repeat: no-repeat;
    padding-left: 20px;
    Display: block;
    }

    / * If link and visited have the same styles, use a comma * /.

    a.enlargeicon:link,
    {a.enlargeicon:visited}
    color: #013976;
    background-position: 0px 0px;
    }

    / * remember the accent * /.

    a.enlargeicon:hover,
    a.enlargeicon: active,.
    a: {enlargeicon:focus}
    color: #C37C00;
    background-position: 0 - 19px;
    }

    Nice to see Sprites!  I wish that more people used. :-))

    Nancy O.
    ALT-Web Design & Publishing
    Web | Graphics | Print | Media specialists
    http://ALT-Web.com/
    http://Twitter.com/ALTWEB

Maybe you are looking for

  • Watch display low is same the intensity setting

    After the update to watch OS 2.2.2 my screen is small. I checked the settings of brightness on the watch and iPhone app to watch and have shut down & restarted and not matched and re-pair and even cleaned the glass just in case... Always off. Help!

  • iOS 9.3.1 App crash "active Zoom.

    I made the mistake of updating my mini Ipad with ios 9.3.  Now, when I'm in an application (it doesn't seem to matter what type - games, weather, news) there all of a sudden freezes the screen is blank and I get the 'active zoom' appear square before

  • VeriStand "Custom Device" creation, including the different types of sources of code for simulation only

    Hello Before I ask my questions, I want to describe my problem: I would use VeriStand on a PXI system for simulation only. The simulation includes different types of sources such as Maltlab-Simulink-models, MultiSim SPICE models and code LabView for

  • I use XP Home Edition for commercial purposes?

    I have the license for windows XP Edition family? Can I use it in my office to effect buiseness?

  • EqualLogic storage pool - replication

    I am very new at EQL replication and am trying to wade into white papers. I have several questions that I expect to have answered. But first a bit of my setup. I have a PS6110XV (firmware 6.05) and one Storage Pool and Volume/LUN serving an ESX HA Cl