Search Results

Search found 15344 results on 614 pages for 'layout manager'.

Page 115/614 | < Previous Page | 111 112 113 114 115 116 117 118 119 120 121 122  | Next Page >

  • How to manage a BorderLayout with generic JPanel()

    - by Nick G.
    Im not sure how to reference to JPanel when it was declared like this, I had someone else help me on JPanels and this is the code he used: final JFrame frame = new JFrame("CIT Test Program"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setPreferredSize(new Dimension(350, 250)); frame.add(new JPanel() {{ Not sure how to reference to JPanel to use BorderLayout. How would I go about doing this?

    Read the article

  • Window sizing constraints by content

    - by EFraim
    I want the window to respect MinWidth/MinHeight and MaxWidth/MaxHeight specifications of the content control inside. Some suggested using SizeToContent, but this only helps to set the initial window size, not the constraints. Others suggested overriding MeasureOverride and setting window's Min/Max height and width there, but this seems to be somewhat unclean, considering that such a trivial problem should surely have a purely declarative solution. Just to mention another solution which seems reasonable but does not work (and had been previously mentioned in an answer which got deleted): binding MinWidth of the window to MinWidth of the control does not take into account window decorations.

    Read the article

  • Android ListView Item Visibility

    - by user1478754
    I'm trying to create a screen that displays multiples items. For this, I've created a listview but I'm not sure how to approach how to add/remove items from it. Since I'm using custom listview items, I've created my own listadapter but now I need a way to add items on a button click. Is there a way to create listview that can take an indefinite amount of items (instead of passing it in an fixed length array of View objects)? Also what's the best way to remove items from listviews? setVisibility?

    Read the article

  • Position of Footer is Constant

    - by mdogg
    How can I get my footer to be at the bottom of the container, after everything in main? Here's the site: (It's fine on the homepage, but not on any of the others) http://dl.dropbox.com/u/122695/ds/index.html

    Read the article

  • auto resize text (font size) when resizing window?

    - by Stephen
    Hi, I have been trying(in vain) to build a page whose elements would resize as I changed the window size. I have it working in css for images no problem, but I can't seem to accomplish the same for text, and I am not sure it is even possible in CSS. And I can't seem to find a jquery script that accomplishes this. When a user resizes the window, I essentially want the page to scale dynamically and fluidly, without the user having to invoke page zoom. This works fine on my img divs via css, but not for the text, which stays the same size. any ideas? Thanks!

    Read the article

  • CSS Unwanted padding in IE using floats.

    - by user564176
    It's been a long day of designing and I ran into a problem today. The website www.dcninc.com/newtest/security_testing.php is a new design I'm working on at work right now. If you view it in Firefox you will notice there is no padding on the 2 right boxes (I did that on purpose to trouble shoot my problem) However if you view that same page in IE, it adds padding to the right side. Here is my CSS and HTML below. http://pastebin.com/hRxZp9ub http://pastebin.com/YwSYn7ti

    Read the article

  • finditem() doesn't find menu, stuck with NullPointerException

    - by fdansv
    I'm stuck while changing some properties on my options menu at onCreateOptionsMenu(). It seems like findItem() returns null, even though I'm pretty sure that the reference to the menu item is correct. My code looks as follows: @Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.activity_profile, menu); MenuItem leftie = menu.findItem(R.id.menu_profile); leftie.setIcon(R.drawable.ic_menu_mapmode); leftie.setTitle(R.string.back_map); leftie.setIntent(authIntent); return true; } I really don't know what can be wrong there. Thanks in advance :) EDIT: I forgot to include the actual problem.

    Read the article

  • Displaying Data on the Windows Form

    - by The.Anti.9
    I'm searching files and returning lines that include the search text, and I'm not really sure the best way to display the information I get. Every time I get a match, I want to show, in some sort of control, the File it came from, and the whole text line. (aka streamreader.ReadLine() result). First I tried just putting it all in a read-only text box, but it doesn't have a scroll bar. What is the best form control to help me display this data neatly?

    Read the article

  • Android List view.

    - by Dev.Android
    I want to create the activity which will load the images from Web by using urls and i want to load that images in list view and i want some specific text and properties of that image in front of that image like the image below Click to see Image.Is there any way to store that images temporarily in phones memory.So how can i do this activity please give me perfect solution so that i can complete my application.How can i load the images from web.

    Read the article

  • How to arrange labels in a flowlayout manner?

    - by Tim Büthe
    How do I arrange some UILabels and/or UIButtons of a variable length? I just want to add them to a UITableViewCell and they should arrange in a left-to-right flow, much like lines of text in a paragraph. I only found possibilities to create lables with a fixed size and position using "initWithFrame:...". Same seems to be true for Interface Builder, as far as I can tell. Any solution is appreciated no matter if it's done in code or using a custom cell XIB-file.

    Read the article

  • Is it good to use Jquery UI themes in a big high traffic website?

    - by Amr ElGarhy
    Is it a good way to use JQuery UI themes while implementing a high traffic website. Is it easy to edit and customize a little based on my website needs? Does it has any famous problems? want to hear your ideas about it and is it safe to use or its better to write all my CSS from scratch. Note that i checked the themes there and found there nice and some of them after some edits will fit the design we have.

    Read the article

  • Why is android:transcriptMode="normal" not working properly?

    - by BCS
    I've been doing a lot of fiddling with an issue I've been having. What happens is each time an item gets added to my listview (adapter) I expect it to auto-scroll if I'm at the last item (which it will do to an extent); HOWEVER, if 3 or more items get added at once, it will not auto-scroll. Here is the XML of that listview: <ListView android:id="@android:id/list" android:layout_width="fill_parent" android:layout_height="0dip" android:layout_weight="1" android:transcriptMode="normal"/> I tried a workaround using a snippet I found here. My code is as follows: public void addChat(final String text, final String username) { this.runOnUiThread(new Runnable() { public void run() { globals.chatAdapter.add(DateFormat.format("hh:mmaa", Calendar.getInstance()).toString(), username, text); globals.chatAdapter.notifyDataSetChanged(); int lastP = getListView().getLastVisiblePosition(); int count = globals.chatAdapter.getCount() - 1; if (lastP == globals.chatAdapter.oldP || lastP == -1) { getListView().setSelection(count); } globals.chatAdapter.oldP = count; } }); } The problem with this is when a bunch of items come in at once, getListView().getLastVisiblePosition() will not update right away causing a setSelection() to never get called, and thus no auto-scroll. Any suggestions?

    Read the article

  • null pointer exception in textview of setcontent

    - by kitokid
    I am getting the java.lang.NullPointerException on createTabContent for the following code. There are two tabspecs. When I called and set the tab , changed the tabs for the first time it is ok. But when i called again while I am on the second tab, its hit the null pointer exception for line : NoStudentText.setVisibility(View.VISIBLE); I will show No Student Text if there is no data for the student list. It shows the text for the first time call. But If I do second time call to that tab, got the error. tspecStudent.setContent(new TabContentFactory() { public View createTabContent(String arg0) { if(listStudent != null && listStudent .size() > 0) { //show the student list } else { TextView noStudentText = (TextView)findViewById(R.id.NoStudentText); noStudentText.setVisibility(View.VISIBLE); return noStudentText; } } });

    Read the article

  • TextAppearance_Holo_Large - No resource found

    - by npmaster
    When compiling my app I get the following error: android-apt-compiler: ... \res\values-v14\styles.xml:12: error: Error retrieving parent for item: No resource found that matches the given name '@android:style/TextAppearance_Holo_Large. The code it is complaining about is: <style name="Title" parent="@android:style/TextAppearance_Holo_Large"> <item name="android:layout_height">wrap_content</item> <item name="android:layout_width">wrap_content</item> </style> I checked my manifest file and I have set the SDK to: <uses-sdk android:minSdkVersion="14" android:targetSdkVersion="17" /> Which i believe allows for using the Holo Themes. I am using Android Studio though I doubt that is the cause of the error. Any ideas what I am doing wrong?

    Read the article

  • HTML5 card game [closed]

    - by ChrisCa
    I created a card game in silverlight a year or so ago in order to learn a bit about Silverlight. I am now wanting to make a HTML5 version of the game in an effort to learn a little bit more about that. I am thinking I'd like to take advantage of stuff like Knockout.js and WebSockets and the canvas element. Now what I'm confused about is how to lay out the cards on the screen. With Silverlight I was able to make a "Hand" control, which was made up of two sub controls - the cards the player has in their hand and the ones they have on the table. And they in turn were made up of Card controls. Now I don't believe there is the concept on a User Control in javascript. So I am possibly thinking about this in entirely the wrong way. So my question is - how could I lay out some cards on the table and perhaps make reuse of something for each player? I have a client side JSON object called game, which contains an array of players. Each player has a hand which is made up of an array of in-hand cards and on-table cards. Ideally I would like to bind these to something using Knockout.js - but I don't know what I could bind to. Would I simply position images (of cards) on a canvas? Is there a way to make some kind of Hand object that each player could have and that I could bind to? Any advice? Or sample code you've seen elsewhere?

    Read the article

  • how to make a stretchable blog header.

    - by Bunny Rabbit
    while editing the template of my blog i saw that header size is set to 660px by the css property width:660px .Now i want to make my header spread across the whole lenth of the browser and also i don't want to specify some specific length in pixels ,so that the blog don't look odd in widescreen vs normal monitors .how do i do that ?

    Read the article

  • Android app display different blocks of text using the same views.

    - by user465131
    I am sure there is a better way to do what I am doing in my apps. The current one I am trying to improve is a list of military cadences. The way I am doing it now is by loading html files in a web view. What I would like to be able to do is have one view set up and just be able to add the text portion of what I would be displaying with the html file. What would be the best method. I know this is probably a pretty simple thing to do with a sting or array but I am at the very beginner level and would need to be pointed in the right direction to do it.

    Read the article

  • CSS 3 columns, why is the third column taking over the other 2?

    - by Matt Dawdy
    Here is the smallest amount of code that clearly illustrates my problem: <html> <body> <div style="float: left; width: 200px;">One</div> <div style="float: left; width: 200px;">Two</div> <div style="background-color: #f0f;">Three</div> </body> </html> The first 2 divs are supposed to be 2 left columns. The 3rd should take up the rest of the page. Eventually, I'm going to add options to hide and show the 2 columns on the left. But, why is the color purple extending all the way to the browser's left edge? I am trying to get it to start at the word "Three".

    Read the article

  • Distribution of many small classes

    - by Moo-Juice
    Hi All, I have a base class called EventArgs. Derived from this are many, many specializations that represent event arguments for a particular kind of event. Consumers of these events may need some, many, or very few of these argument classes. My question is, would you provide a header file for each type (e.g, 50+ header files for the varying ones), would you try to group them in to families and have a 'common' header file for those, or would you throw caution to the window and throw them in to one easy-of-use header file that can just be included? Another approach might be to have 50 header files, and then I could introduce some "family" header files that included particular ones. Not sure about the naming conventions for these kinds of things so it is obvious what is where. I know there may not be a hard and fast rule, but wondering what other developers have done when they find themselves writing many little classes. Thanks in advance.

    Read the article

< Previous Page | 111 112 113 114 115 116 117 118 119 120 121 122  | Next Page >