- Joined
- Feb 26, 2008
- Messages
- 4,876 (0.83/day)
- Location
- Joplin, Mo
System Name | Ultrabeast GX2 |
---|---|
Processor | Intel Core 2 Duo E8500 @ 4.0GHZ 24/7 |
Motherboard | Gigabit P35-DS3L |
Cooling | Rosewill RX24, Dual Slot Vid, Fan control |
Memory | 2x1gb 1066mhz@850MHZ DDR2 |
Video Card(s) | 9800GX2 @ 690/1040 |
Storage | 750/250/250/200 all WD 7200 |
Display(s) | 24" DCLCD 2ms 1200p |
Case | Apevia |
Audio Device(s) | 7.1 Digital on-board, 5.1 digital hooked up |
Power Supply | 700W RAIDMAXXX SLI |
Software | winXP Pro |
Benchmark Scores | 17749 3DM06 |
I am setting up a program for our organization to automatically run installations and updates when a computer is first set up on a domain.
I want the best customization of the look, even if I have to set each object by the pixel using object.setBounds(x,y,width,height)
The problem is that if I use this without any particular layout, the final button using add() covers the whole window.
Let me know your thoughts (yes Kreij, lookin at you )
I can show you the code, but because of it being a small program , but you might get sick and throw up at the amount of terrible organization and lack of notation.
Just a reminder, the program is far from done, so it is shabby. If you want to run it create your main method and call buttons.
I want the best customization of the look, even if I have to set each object by the pixel using object.setBounds(x,y,width,height)
The problem is that if I use this without any particular layout, the final button using add() covers the whole window.
Let me know your thoughts (yes Kreij, lookin at you )
I can show you the code, but because of it being a small program , but you might get sick and throw up at the amount of terrible organization and lack of notation.
Code:
//Directions for each task:
//COMPLETED Windows Date/Time: Control.exe TIMEDATE.CPL,,/Z (GMT-06:00) Central Time (US & Canada)
//Wired Autoconfig: net start "wired autoconfig"
//802.1x: ncpa.cpl
package arsocapp;
import javax.swing.*;
import javax.swing.event.*;
import java.awt.*;
import java.awt.event.*;
import java.io.*;
public class buttons extends JFrame{
JButton setTime, mapBat, openNetFolders, pushIt, set802, windowsUpdate;
JButton wsusUpdate, socomFrame, cmdagent, gpupdateRegister;
public buttons() {
//Container Panel;
//LayoutManager Layout;
//Layout = new GridLayout();
//Panel = getContentPane ();
//Panel.setLayout (Layout);
setTime = new JButton("Set Time to Central", null);
mapBat = new JButton("Map your network drives", null);
openNetFolders = new JButton(" Time to Central", null);
pushIt = new JButton("Set Time to Central", null);
set802 = new JButton("Set Time to Central", null);
windowsUpdate = new JButton("Set Time to Central", null);
wsusUpdate = new JButton("Set Time to Central", null);
socomFrame = new JButton("Set Time to Central", null);
cmdagent = new JButton("Set Time to Central", null);
gpupdateRegister = new JButton("Set Time to Central", null);
setTime.setBounds(0, 0, 150, 25);
mapBat.setBounds(200,1,199,49);
add (setTime);
add (mapBat);
add (openNetFolders);
/*add (pushIt);
add (set802);
add (windowsUpdate);
add (wsusUpdate);
add (socomFrame);
add (cmdagent);
add (gpupdateRegister);*/
mapBat.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e){
mapBat.setEnabled(false);
try{
String command = "C:\\Windows\\system32\\net.exe use j: \\\\campuua-napp-01\\25b_adm";
Runtime.getRuntime().exec(command);
}
catch (Exception err) {
err.printStackTrace();
}
}
});
setTime.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e){
setTime.setEnabled(false);
try{
String command = "Control.exe TIMEDATE.CPL,,/Z (GMT-06:00) Central Time (US & Canada)";
Runtime.getRuntime().exec(command);
}
catch (Exception err) {
err.printStackTrace();
setTime.setEnabled(false);
}
}
});
}
}
Just a reminder, the program is far from done, so it is shabby. If you want to run it create your main method and call buttons.