HACK

HACK Hack

20/08/2022
28/06/2016
29/06/2015

जीवनात मागे बघाल तर,👌
अनुभव मिळेल..
जीवनात पुढे बघाल तर,🌞
आशा मिळेल..…
इकडे -तिकडे बघाल तर,🍃🍂
सत्य मिळेल...
आणि आपल्या स्वत:च्या आत मध्ये बघाल तर,🌱
आत्मविश्वास मिळेल..
🙏 शिव सकाळ 🙏

28/03/2015
24/03/2015

import java.awt.Component;
import java.awt.Container;
import javax.swing.BoxLayout;
import javax.swing.JButton;
import javax.swing.JFrame;

public class BoxLayoutDemo {
public static void addComponentsToPane(Container pane) {
pane.setLayout(new BoxLayout(pane, BoxLayout.Y_AXIS));

addAButton("Button 1", pane);
addAButton("Button 2", pane);
addAButton("Button 3", pane);
addAButton("Long-Named Button 4", pane);
addAButton("5", pane);
}

private static void addAButton(String text, Container container) {
JButton button = new JButton(text);
button.setAlignmentX(Component.CENTER_ALIGNMENT);
container.add(button);
}

private static void createAndShowGUI() {

JFrame frame = new JFrame("BoxLayoutDemo");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

addComponentsToPane(frame.getContentPane());

frame.pack();
frame.setVisible(true);
}

public static void main(String[] args) {

javax.swing.SwingUtilities.invokeLater(new Runnable() {
public void run() {
createAndShowGUI();
}
});
}
}
OUTPUT

23/03/2015

< stdio.h>

int main()
{
int i;

/* The loop goes while i < 10, and i increases by one every loop*/

for ( i = 0; i < 10; i++ ) {

/* Keep in mind that the loop condition checks
the conditional statement before it loops again.
consequently, when i equals 10 the loop breaks.
i is updated before the condition is checked. */

printf( "%d\n", i );
}
getchar();
}

Address

Pune
Pune
40012

Alerts

Be the first to know and let us send you an email when HACK posts news and promotions. Your email address will not be used for any other purpose, and you can unsubscribe at any time.

Share