answersLogoWhite

0


Best Answer

If your talking about when you are packing components in a JFrame for example, something along the syntax of:

public static void main(String[] args) {

GUIFrame frame = new GUIFrame();

frame.setLocation(100, 100);

frame.setTitle("This is a JFrame implementation");

frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

frame.pack();

frame.setVisible(true);

}

If you mean something like this, then the pack() method simply crams all the components together, to make the smallest space in a frame. They can be useful if all you want is that, otherwise options such as the .setSize(int height, int length); are also available for specific sizes.

User Avatar

Wiki User

12y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is pack method in java programming?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is the meaning of a method in Java programming?

a method is a variable


Where can someone find information on the Java language for no such method error be found?

"No such method" is an error message that may appear when attempting to create a program with Java. Users who understand the Java programming language can find an answer on websites such as Stack Overflow and Crafting Java.


What is meant by native method in java?

The Java native method is a great way to gain and merge the power of C or C++ programming into Java. To use Java as a scientific and high performance language, when efficient native Java compilers are not fully implemented, use native method can boost the performance to at least the speed of C compiled code.


Why do you use static key word in Java programming?

Static is a keyword,when u execute a method in class file loaded, execute the first this method..


What programming language are java applets written in?

Java applets are written in the Java programming language. Java is considered to be one of the oldest and most commonly used programming languages in the world.


What is the first name before of the Java Programming?

The first name of the Java Programming was Oak. It then went by the game Green and finally Java from Java coffee.


What is abstraction method in java?

Abstraction in Java or Object oriented programming is a way to segregate implementation from interface and one of the five fundamentals along with Encapsulation, Inheritance, Polymorphism, Class and Object. Abstraction in Java is achieved by using interface and abstract class in Java.


Is java DBMS?

no, Java is not dbms.. Java is a programming language Dbms is database


What is java card?

Java Card is a Java platform for programming smart cards.


Is the best institute for learn java programming in Pakistan?

The Java programming language is a general-purpose computer programming language that is concurrent, class-based, object-oriented, and specifically designed to have as few implementation dependencies as possible. Then you learn java programming language in Pakistan get the best java programming classes at the lowest cost.


What is the pane in which the Java programming statements are located called?

The pane in which the Java programming statements are located is called


What are the features in java that makes it similar to C programming?

Java is not similar to C. Java is, however, similar to C++. Both C++ and Java are object orientated programming languages (OOPL's).